IPrxReportExporter.ExportSecurityLabels

Fore Syntax

ExportSecurityLabels: Boolean;

Fore.NET Syntax

ExportSecurityLabels: Boolean;

Description

The ExportSecurityLabels property determines authorization to export marking stamp into the RTF format (*.rtf).

Comments

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:

If the property is set to False, it disables export of marking stamp to the RTF format (*.rtf).

Fore Example

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:\test\Report.rtf","rtf");
End Sub UserProc;

As a result, displaying of marking stamps is displayed regardless of settings, the regular report is exported to the "Report.rtf" file, but the output file does not display marking stamp.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

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;

See also:

IPrxReportExporter