SaveToFile(FileName: String);
SaveToFile(FileName: string);
FileName. Path and name of the file where dashboard will be saved.
The SaveToFile method saves a dashboard in the specified file of the PPDASH format.
To load the dashboard from the PPDASH file, use the IAdhocReport.LoadFromFile method.
Executing the example requires that the repository contains a dashboard with the ADHOC identifier.
Add links to the Adhoc and Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
AdhocReport: IAdhocReport;
Begin
MB := MetabaseClass.Active;
AdhocReport := MB.ItemById("ADHOC").Bind As IAdhocReport;
AdhocReport.SaveToFile("C:\Report.ppdash");
End Sub UserProc;
After executing the example the report is saved to the Report.ppdash file.
The requirements and result of the Fore.NET example match with those in the Fore example.
Imports Prognoz.Platform.Interop.AdHoc;
Imports Prognoz.Platform.Interop.Metabase;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
AdhocReport: IAdhocReport;
Begin
MB := Params.Metabase;
AdhocReport := MB.ItemById["ADHOC"].Bind() As IAdhocReport;
AdhocReport.SaveToFile("C:\Report.ppdash");
End Sub;
See also: