Allow Users to Specify which Data is Included in a Report

You can use Parameters to enable user-input as to which data is included in a report (see Parameter Field). This allows you to produce one report that can be used as a basis for generating reports that have different content.

For examples of how you can use Parameters to limit the Geo SCADA Expert data that is included in a report, see below. For information on using Parameter fields and the Select Expert window, see the documentation provided with the Crystal Reports application.

Parameters are particularly useful when generating reports that query historic table(s), as they can be used to specify the time-period for which data is required (see Restrict the Amount of Data that is Queried in a Report). You may also find Parameters useful when Configuring Reports within Group Templates.

To produce a report that has a subset of the overall data in a database table, see Limit the Data that is Included in a Report.

Example:

A report references the CDBPoint database table. The CDBPoint table contains data on the points in a Geo SCADA Expert system.

Whenever the report is generated, it only needs to include the data for points that reside in a whichever Group in the Geo SCADA Expert database is of interest at that time.

A Parameter field is added to the report to allow users to specify the Group for which data is to be generated for the report.

When a user selects the Generate Report pick action from ViewX, a window is displayed prompting the user to specify the Group for which they want to generate the report:

The user uses the combo box to display a list of available Groups and specify the Group for which the report is to be generated:

The resulting report only includes the data for the points that are in the specified Group:

If a user later generates another copy of the report for another Group:

Another version of the same report is generated, which displays point data for that selected Group:

To enable Group selection in this way, the Parameter field that was added to the report references the ParentGroupName field within the CDBPoint table. The ParentGroupName field is the field that specifies the Group to which each point belongs.

The Parameter field, named SpecifyGroupName, includes this configuration:

  • Type—String. (The Group Names are text strings.)
  • Value Field—ParentGroupName. (The field that specifies the Group with which a point is associated. This field is in the CDBPoint table.)
  • Prompt Text—Please Specify the Point Group. (This is the prompt that is displayed whenever a user attempts to generate the report.)

    Use the Actions menu to Append all database values. (This adds the Parent Group Names to the list that is offered whenever a user attempts to generate the report.)

    Once the Parameter field has been added to the report, the Select Expert window is used to define the selection settings for the ParentGroupName field. (In this case, that the ParentGroupName field should be restricted to the entry that a user specifies using the Parameter field (which itself is named ‘SpecifyGroupName’).)

    Be aware that in the above example, the list of Groups that are available for selection is a ‘snap-shot’ of the Groups that existed at the time that the report was configured. If Groups are later added or removed from the Geo SCADA Expert database, the report’s Parameter configuration will need updating to encompass those changes.

For a further example on using Parameter fields in reports, see Configuring Reports within Group Templates.


Disclaimer

Geo SCADA Expert 2020