ReportEvents.OnBeforeOpenReport

Syntax

Sub OnBeforeOpenReport(Report: IPrxReport; Var Cancel: Boolean);

Begin

    // set of operators

End Sub OnBeforeOpenReport;

Parameters

Report. The regular report that generated the event.

Cancel. This parameter is responsible for report opening.

Description

The OnBeforeOpenReport method implements the event that occurs before opening of the regular report.

Comments

Available values of the Cancel parameter:

If one changes selection in the data slice dimension, to which a control is bound, in the OnBeforeOpenReport event, the report (ReportEvents.OnAfterExecuteReport, ReportEvents.OnBeforeExecuteReport) and its sheets (ReportEvents.OnAfterRecalcSheet, ReportEvents.OnBeforeRecalcSheet) will be calculated twice. To avoid this feature, use the algorithm:

  1. Disable calculation of a sheet or sheets, to which the control is bound. To do this, the IPrxControl.AutoRecalc property should be set to False.

  2. If analytical data area is used, disable calculation of table. To do this, the IPivot.EventsEnabled property should be set to False.

  3. Change selection in the data slice dimension.

  4. If analytical data area is used, enable calculation of table. To do this, the IPivot.EventsEnabled property should be set to True.

  5. Enable calculation of a sheet or sheets, to which the control is bound. To do this, the IPrxControl.AutoRecalc property should be set to True.

NOTE. If data area is used, skip steps 2 and 4.

See also:

ReportEvents