IMetabaseObjectParamValuesEx.StateOptions

Syntax

StateOptions: Integer;

Description

The StateOptions property determines the additional state used on opening a regular report for view.

Comments

When StateOptions is set, setting of the IPrxReportOptions.NoRecalcOnOpen property is ignored and:

Example

Executing the example requires a regular report with the REGULAR_REPORT identifier.

Add links to the Metabase and Report system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MBobj : IMetabaseObjectDescriptor;
    Param : IMetabaseObjectParamValues;
    ParamEx : IMetabaseObjectParamValuesEx; 
    Report: IPrxReport;
    Recalc: Boolean;
Begin
    MB := MetabaseClass.Active;
    MBobj := MB.ItemById("REGULAR_REPORT").Bind;
    Param := MBobj.Params.CreateEmptyValues;
    Param.Item(0).Value := DateTime.Today;
    ParamEx := Param As IMetabaseObjectParamValuesEx;
    Report := MBobj.Open(Param) As IPrxReport;
    Recalc := Report.Options.NoRecalcOnOpen;
    If Recalc Then
        ParamEx.StateOptions := 2;
        Else
            ParamEx.StateOptions := 1;
    End If;
End Sub UserProc;

After executing the example it is checked if there is the value set in the IPrxReportOptions.NoRecalcOnOpen property. The value of the StateOptions property is set depending on this value.

See also:

IMetabaseObjectParamValuesEx