AdhocReport: IAdhocReport;
The AdhocReport property determines the exported report.
If it is required to export only some blocks from the report, use the IAdhocReportExporter.Sources property.
Executing the example requires that the repository contains a dashboard with the ADHOC identifier containing a block with the IQY1DKCFA3U5BTQP identifier.
Add links to the Metabase, Adhoc system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Rep: IAdhocReport;
Ex: IAdhocReportExporter;
Begin
mb := MetabaseClass.Active;
// Get dashboard
Rep := mb.ItemById("ADHOC").Bind As IAdhocReport;
// Create an export object
Ex := New AdhocReportExporter.Create;
// Create an exported dashboard
Ex.AdhocReport := Rep;
// Run export
Ex.ExportToFile("C:\Dashboard.xls", "XLS");
End Sub UserProc;
After executing the example the dashboard will be exported to the "C:\Dashboard.xls" file.
See also: