LoadChildScreenshots(Type: ScreenshotType);
LoadChildScreenshots(Type: Prognoz.Platform.Interop.Metabase.ScreenshotType);
Type. Image type were cashing is executed.
The LoadChildScreenshots method caches images used on preview for all children objects.
On executing the method the images used on previewing will be placed to cash for all preview supporting children objects. Preview is presenting of repository objects as large icons. Preview as an image of the first page is available for reports created by means of the Dashboards, Analytical Queries (OLAP), Reports and Time Series Analysis tools.
The method relevant for use, if the IMetabase.IsScreenshotSupported property returns True.
Executing the example requires that the repository contains a folder with the REPORTS_FOLDER identifier. The folder stores various reports.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
Begin
MB := MetabaseClass.Active;
If MB.IsScreenshotSupported Then
MDesc := MB.ItemById("REPORTS_FOLDER");
MDesc.LoadChildScreenshots(ScreenshotType.Default_);
End If;
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
Begin
MB := Params.Metabase;
If MB.IsScreenshotSupported Then
MDesc := MB.ItemById["REPORTS_FOLDER"];
MDesc.LoadChildScreenshots(ScreenshotType.stDefault);
End If;
End Sub;
On executing the example, if the option of object displaying as extra large icons without taking into account access permission in repository is active, for all objects from the specified folder tiny images will be saved to the local cash in the current local computer.
See also: