Skip to main content
All docs
V26.1
  • TdxCustomReportControl.Active Property

    Specifies whether the TdxReportControl component displays content.

    Declaration

    property Active: Boolean read; write; default True;

    Property Value

    Type Default Description
    Boolean True

    Specifies if the Report Viewer control is active:

    True

    Default. The Report Viewer control displays a document generated based on the current report layout definition and source data.

    In this mode, the Report Viewer control displays a selector rectangle at design time if ReportName and Layout properties are specified and a configured data connection component is available.

    False

    The Report Viewer control displays a the current report name or “No report to display” if the report layout definition, report name, or a data source/data connection component is not configured/unspecified.

    Tip

    This option allows you to avoid redundant content redraw operations during batch changes applied to source data.

    Remarks

    You can set the Active property to False to hide report content.

    Code Example: Filter Displayed Data Using a Query Parameter

    The code example in this section populates the report template with data filtered using a parameter and displays the generated document in an individual TdxReportControl component embedded into an MDI Child form.

    Tip

    This TdxReportControl usage scenario is demonstrated in the following tutorial:

    Read Tutorial: Embed a Parametrized Report into a Form

    procedure TMainForm.btnUKCustomersClick(Sender: TObject);
    var
      AForm: TReportChildForm;
    begin
      AForm := TReportChildForm.Create(Self);  // dxReportControl1.Active is disabled at design time
      AForm.Caption := 'UK Customers';
      // Apply the target filter criteria to data using the previously configured report parameter
      AForm.dxReportControl1.Parameters['CountryReportParameter'].Value := 'UK';
      AForm.dxReportControl1.Active := True;  // Displays report content according to the filter criteria
    end;
    

    VCL Reports: A DevExpress Report Control-Powered Multi-Document Interface App

    Default Value

    The Active property’s default value is True.

    See Also