IMetabaseUpdateObjectNode.IncludeScreenshot

Syntax

IncludeScreenshot: Boolean;

IncludeScreenshot: Boolean;

Description

The IncludeScreenshot property determines whether object preview image is included in update.

Comments

A preview image can be obtained in the IMetabaseObjectDescriptor.Screenshot property.

Available values of the IncludeScreenshot property:

Example

Executing the example requires that the repository contains a regular report with the REPORT identifier.

Add links to the Metabase system assembly.

Sub UserProc;
Var
    Mb: IMetabase;
    Obj: IMetabaseObjectDescriptor;
    Upd: IMetabaseUpdate;
    Nd: IMetabaseUpdateObjectNode;
    RootFolder: IMetabaseUpdateFolderNode;
Begin
    Mb := MetabaseClass.Active;
    Upd := Mb.CreateUpdate;
    Obj := Mb.ItemById(
"REPORT").Bind;
    RootFolder := Upd.RootFolder;
    Nd := RootFolder.Add(MetabaseUpdateNodeType.Object) 
As IMetabaseUpdateObjectNode;
    Nd.Object := Obj;
    
If Mb.IsScreenshotSupported Then
        Nd.IncludeScreenshot := 
True;
    
End If;
    Upd.SaveToFileNF(
"C:\Update.pefx");
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    Obj: IMetabaseObjectDescriptor;
    Upd: IMetabaseUpdate;
    Nd: IMetabaseUpdateObjectNode;
    RootFolder: IMetabaseUpdateFolderNode;
Begin
    Mb := Params.Metabase;
    Upd := Mb.CreateUpdate();
    Obj := Mb.ItemById[
"REPORT"].Bind();
    RootFolder := Upd.RootFolder;
    Nd := RootFolder.Add(MetabaseUpdateNodeType.untObject) 
As IMetabaseUpdateObjectNode;
    Nd.Object := Obj;
    
If Mb.IsScreenshotSupported Then
        Nd.IncludeScreenshot := 
True;
    
End If;
    Upd.SaveToFileNF(
"C:\\Update.pefx");
End Sub;

After executing the example a new update is created, which will include the regular report. If displaying of extra large icons is enabled in the repository, the regular report preview image is also included in the update.

See also:

IMetabaseUpdateObjectNode