BulkSettings: IAdhocBulkSettings;
None;
The BulkSettings property returns the parameters of dashboard batch operations.
By default, batch export is executed to different files.
Executing the example requires a form containing the Button component with the Button1 identifier. The repository must contain a dashboard named AN_PAN. Add links to the Metabase, Adhoc system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
mb: IMetabase;
Rep: IAdhocReport;
Ex: IAdhocReportExporter;
BulkSettings: IAdhocBulkSettings;
i: Integer;
Sel: IAdhocBulkSelection;
Begin
MB := MetabaseClass.Active;
// Get dashboard
Rep := MB.ItemById("AN_PANEL").Bind As IAdhocReport;
// Create an export object
Ex := New AdhocReportExporter.Create;
// Create an exported panel
Ex.AdhocReport := Rep;
Ex.Sources.Add(Rep.DataSourceObjects.Item(0));
BulkSettings := Ex.BulkSettings;
BulkSettings.Enabled := True;
For i := 0 To Rep.DataSourceObjects.Item(0).Dimensions.Count - 1 Do
Sel := BulkSettings.SelectionSet.Add(Rep.DataSourceObjects.Item(0).Dimensions.Item(i));
Sel.Selection.SelectElement(0, False);
End For;
Ex.BulkSettings := BulkSettings;
Ex.ExportToFile("c:\ANPANEL.XLS", "XLS");
End Sub Button1OnClick;
After executing the example the data from the dashboard will be exported to the ANPANEL.XLS file.
See also: