IPrxControlAppearance.SheetRecalc

Fore Syntax

SheetRecalc(Sheet: IPrxSheet): Boolean;

Fore.NET Syntax

SheetRecalc[Sheet: Prognoz.Platform.Interop.Report.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.

Fore 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.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Report;
Public Partial Class OBJ1Form: Prognoz.Platform.Forms.NET.ForeNetForm
Report: IprxReport;
Private Sub OBJ1Form_Load(sender: System.Object; e: System.EventArgs);
Var
    Mb: IMetabase;
    Desc: IMetabaseObjectDescriptor;
Begin
    MB := ReportBoxNet1.Metabase;
    Desc:= MB.ItemById["Rep1"];
    UiReportNet1.Object:= Desc;
    UiReportNet1.Active := True;
End Sub;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    ControlAppearance: IPrxControlAppearance;
Begin
    Report:= UiReportNEt1.Object.Edit() As IPrxReport;
    ControlAppearance := Report.Controls.Item[0].Appearance;
    ControlAppearance.SpecificRecalc := True;
    ControlAppearance.SheetRecalc[Null] := False;
    ControlAppearance.SheetRecalc[Report.Sheets.Item[0]] := True;
    ControlAppearance.SheetRecalc[Report.Sheets.Item[1]] := True;
    ControlAppearance.SheetRecalc[Report.Sheets.Item[2]] := True;
    ControlAppearance.SheetRecalc[Report.Sheets.Item[3]] := True;
    uiReportNet1.ReportUi.Report := Report;
End Sub;

See also:

IPrxControlAppearance