IPrxControlAppearance.SheetRecalc

Syntax

SheetRecalc(Sheet: IPrxSheet): Boolean;

Parameters

Sheet. Regular report sheet.

Description

The SheetRecalc property determines whether to calculate the sheet specified as the parameter when the control value changes.

Comments

Set the Sheet parameter to Null to calculate all regular report sheets.

Example

Executing the example requires a regular report with the Rep1 identifier that contains four or more sheets. Add to the report: a cube as a source, a cube slice, and a dimension as a control. Create a form, place a button named Button1 on it, the ReportControlPanel component with the ReportControlPanel1 identifier, the UiReport component with the UiReport1 identifier, specify the latter as an object of the ReportControlPanel component.

Add a link to the Metabase system assembly.

Rep: IPrxReport;
Sub OBJ1FormOnShow(Sender: Object; Args: IEventArgs);
Begin
    Rep := MetabaseClass.Active.ItemById("Rep1").Edit As IPrxReport;
    UiReport1.Instance := Rep;
End Sub OBJ1FormOnShow;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    ControlAppearance: IPrxControlAppearance;
Begin
    ControlAppearance:= Rep.Controls.Item(0).Appearance;
    ControlAppearance.SpecificRecalc := True;
    ControlAppearance.SheetRecalc(Null) := False;
    ControlAppearance.SheetRecalc(Rep.Sheets.Item(0)) := True;
    ControlAppearance.SheetRecalc(Rep.Sheets.Item(1)) := True;
    ControlAppearance.SheetRecalc(Rep.Sheets.Item(2)) := True;
    ControlAppearance.SheetRecalc(Rep.Sheets.Item(3)) := True;
End Sub Button1OnClick;

After clicking the button, when the control value changes, the first four sheets of the regular report are calculated, the rest of the report is not calculated.

See also:

IPrxControlAppearance