DelayedLoad: Boolean;
DelayedLoad: boolean;
The DelayedLoad property determines whether delayed loading is available for regular report sheets.
Available values:
True. Loading of all sheets is delayed. Only active sheet is loaded.
False. All report sheets are loaded. Default value.
Executing the example requires that repository contains a regular report with the REPORT identifier that contains two sheets.
Add links to the Metabase, Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
Sheet: IPrxSheet;
Sheets: IPrxSheets;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get regular report
Report := MB.ItemById("REPORT").Edit As IPrxReport;
// Set delayed sheet loading
Report.DelayedLoad := True;
// Get report sheets
Sheets := Report.Sheets;
// Get the second report sheet
Sheet := Sheets.Item(1);
// Load the second report sheet, if it is not loaded
If Not Sheet.IsLoaded Then
Sheet.Load;
End If;
// Save report
(Report As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Report;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IPrxReport;
Sheet: IPrxSheet;
Sheets: IPrxSheets;
Begin
// Get repository
MB := Params.Metabase;
// Get regular report
Report := MB.ItemById["REPORT"].Edit() As IPrxReport;
// Set delayed sheet loading
Report.DelayedLoad := True;
// Get report sheets
Sheets := Report.Sheets;
// Get the second report sheet
Sheet := Sheets.Item[1];
// Load the second report sheet, if it is not loaded
If Not Sheet.IsLoaded Then
Sheet.Load();
End If;
// Save report
(Report As IMetabaseObject).Save();
End Sub;
After executing the example, the delayed loading of sheets will be set for report, on opening th report, the active and the second report sheets will be loaded.
See also: