ExportSecurityLabels: Boolean;
ExportSecurityLabels: System.Boolean;
The ExportSecurityLabels property determines authorization to export marking stamp into the RTF format (*.rtf).
The property is set to True by default, which authorizes export of marking stamp to the RTF format (*.rtf). The marking stamp is displayed on exporting and printing, if the IMetabasePolicy.AlwaysPrintDocumentLabel property is set to True or:
The mandatory access control or security level based access control is enabled.
The document marking on export and print is enabled.
The marking stamp is set.
If the property is set to False, it disables export of marking stamp to the RTF format (*.rtf).
Executing the example requires a regular report with the REGULAR_REPORT identifier.
Add links to the Metabase, Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Security: IMetabaseSecurity;
Report: IPrxReport;
Exp: IPrxReportExporter;
Begin
MB := MetabaseClass.Active;
Security:= MB.Security;
// Set marking stamp use regardless of settings
Security.Policy.AlwaysPrintDocumentLabel := True;
// Apply selected policy settings
Security.Apply;
// Get regular report
Report := MB.ItemById("REGULAR_REPORT").Bind As IPrxReport;
// Create an object for export
Exp := New PrxReportExporter.Create;
Exp.Report := Report;
// Disable output of marking stamp to RTF
Exp.ExportSecurityLabels := False;
// Export report to RTF format
Exp.ExportToFile("C:\Report.rtf","rtf");
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Security: IMetabaseSecurity;
Report: IPrxReport;
Exp: IPrxReportExporter;
Begin
MB := Params.Metabase;
Security:= MB.Security;
// Set marking stamp use regardless of settings
Security.Policy.AlwaysPrintDocumentLabel := True;
// Apply selected policy settings
Security.Apply();
// Get regular report
Report := MB.ItemById["REGULAR_REPORT"].Bind() As IPrxReport;
// Create an object for export
Exp := New PrxReportExporter.Create();
Exp.Report := Report;
// Disable output of marking stamp to RTF
Exp.ExportSecurityLabels := False;
Exp.ExportToFile("C:\Report.rtf","rtf");
End Sub;
After executing the example, the display of marking stamp will be enabled independently of the settings, the regular report will be exported to the Report.rtf file. The output file will not display marking stamp.
See also: