IAdhocReportExporter.ExportObjectAsBitmap

Fore Syntax

ExportObjectAsBitmap: Boolean;

Fore.NET Syntax

ExportObjectAsBitmap: Boolean;

Description

The ExportObjectAsBitmap property determines whether report objects will be exported in PDF as an image or a metafile.

Comments

Available values:

Fore Example

Executing the example requires that the repository contains a dashboard with the ADHOC identifier.

Add links to the Adhoc, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Report: IAdhocReport;
    Exporter: IAdhocReportExporter;
Begin
    MB := MetabaseClass.Active;
    // Get dashboard
    Report := MB.ItemById("ADHOC").Bind As IAdhocReport;
    // Create an export object
    Exporter := New AdhocReportExporter.Create;
    Exporter.AdhocReport := Report;
    // Run export
    // Footnote export
    Exporter.ExportFootnotes := True;
    // Objects as images
    Exporter.ExportObjectAsBitmap := True;
    Exporter.ExportToFile("C:\Adhoc(ObjectImage).pdf""pdf");
    // Objects as metafiles
    Exporter.ExportObjectAsBitmap := False;
    Exporter.ExportToFile("C:\Adhoc(ObjectMetafile).pdf""pdf");
End Sub UserProc;

After executing the example the contents of the dashboard will be exported to two PDF files. In one of them, report objects are shown as images, in another - as metafiles. Footnotes are also exported.

Fore.NET Example

Imports Prognoz.Platform.Interop.AdHoc;
Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Report: IAdhocReport;
    Exporter: IAdhocReportExporter = New AdhocReportExporterClass();
Begin
    MB := Params.Metabase;
    // Get dashboard
    Report := MB.ItemById["ADHOC"].Bind() As IAdhocReport;
    // Create an export object
    Exporter.AdhocReport := Report;
    // Run export
    // Footnote export
    Exporter.ExportFootnotes := True;
    // Objects as images
    Exporter.ExportObjectAsBitmap := True;
    Exporter.ExportToFile("C:\Adhoc(ObjectImage).pdf""pdf");
    // Objects as metafiles
    Exporter.ExportObjectAsBitmap := False;
    Exporter.ExportToFile("C:\Adhoc(ObjectMetafile).pdf""pdf");
End Sub;

See also:

IAdhocReportExporter