IGxDocument.Preview

Syntax

Preview(Format: IGxImageFormat): IGxImage;

Parameters

Format. Image format for report preview.

Description

The Preview property returns the image that is used to preview reports.

Comments

A preview as an image of the first page that is available for reports created by means of the Dashboards, Analytical Queries (OLAP), Reports, and Time Series Analysis tools.

Example

Executing the example requires a form with the Button1 button and the ImageBox component named ImageBox1. The repository should contain a regular report with the REPORT identifier.

Add links to the Drawing and Metabase system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Mb: IMetabase;
    Doc: IGxDocument;
    Img: IGxImage;
Begin
    Mb := MetabaseClass.Active;
    Doc := Mb.ItemById("REPORT").Bind As IGxDocument;
    Img := Doc.Preview(GxImageFormats.Png);
    ImageBox1.Image := Img;
End Sub Button1OnClick;

Clicking the button loads an image for report preview to the ImageBox1 component.

See also:

IGxDocument