AdhocReport: IAdhocReport;
None;
The AdhocReport property determines the exported report.
Use the IAdhocReportExporter.DataSources property if only some of the blocks contained in the report must be exported.
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;
// Create an exported block
Ex.DataSources := "IQY1DKCFA3U5BTQP";
// Run export
Ex.ExportToFile("C:\Dashboard.xls", "XLS");
End Sub UserProc;
After executing the example the block with the IQY1DKCFA3U5BTQP identifier is exported to the C:\Dashboard.xls file.
See also: