Defining the Data 

Input Source

 

To determine the source of the data to be displayed in the report, select Input Source from the Report Designer Data menu. The input source can be any native PxPlus file with an embedded data dictionary, a PxPlus View, a Query Definition, or any other data source whose data can be accessed using a Custom Data Source Object. External databases, such as ODBC, Oracle or DB2, can also be accessed via Views.

Select the type of Input Source:

Table Name

Identify an input table using its logical table name as defined in Data Dictionary Maintenance.

Note:
To make it easier to locate a specific table name, apply a filter in the Table Names lookup. See Filtering the Table Names Lookup.

File Path

Select a native PxPlus file using its physical path name. You can also enter a prefix file reference to an external database table (ODBC, ADO, Oracle, MySQL or DB2 are supported).

PxPlus data files must have embedded dictionaries and all files/tables must have keys defined.

View

Select a View from the presented list. Direct access to View Maintenance may also be available, allowing you to update and create Views.

To suppress the View Maintenance option, set the %RW_Suppress_View_Maintenance global variable to a non-zero numeric value.

Query Definition

Select a Query definition. The Query definition must be a Query List or a Standard Query. See Query Type.

  

Query definitions whose main data source is based on PxPlus files with embedded dictionaries, Views definitions, or external data base tables are supported. Queries whose main data source is based on manual field definitions (i.e. fields based on a field number, such as Fld#1) are not supported. For information on defining the contents of a query, see Query Header and Query Definition.

Ensure that formula definitions in selected queries have been assigned names that will be used to identify the formula. If formula names have not been specified in the Query definition, temporary names will be assigned; however, these are subject to change. See Query Formula Definition.

The above window consists of the following:

Query Lookup

Button that invokes the Select a Query Definition window:

  

This window presents a tree view format showing Query Lists and Queries that exist at the current display level and lower, arranged by directory, screen library and query.

Select a Query definition by clicking on a Query in the list. When a Query List or Query is selected, the Library and Query Definition input fields are automatically populated.

Note:
A Query definition can also be selected by entering the Library and Query Definition input fields manually.

Library

Enter the path to the library containing the Query List or Query definition. The Browse button allows you to browse the directory to locate the library. Be sure to use the simplest form of the path for your application.

Note:
The Library name may be a specific or generic reference. See Cascading Language Suffixes.

Query Definition

Select a Query definition from the list of queries in the specified library.

(The ability to select a query definition as an input source was added in PxPlus 2020.)

Source Object

Enter the name of the source object and an argument to identify the input source. The source object must adhere to the Custom Data Source Objects interface standard (used by the Views System).

 

Note:
If a report requires data from multiple related files, additional related data sources may be available for selection if the main data source is defined using a Table Name or File Path. See Related Data Sources.

You can also use a View as the input source (see Views System) or a Query definition (see Query Subsystem), both of which support linking data from multiple sources.

Once an input source is selected, its elements and their descriptions appear in the data items list on the left side of the Report Designer, ready to drag and drop into place on the report layout.

If you want to change the input source, a warning will be displayed to inform you that data elements, sort sequence, filters and data groupings may no longer be valid. You can choose to ignore this warning or clear the selected items.

A report can be defined with no data source selected. The output will consist of one page with a page header, report summary and a page footer.

Note:
To suppress any of the input sources from the Data > Input Source menu or from the data source types in Step 2 of the Report Wizard, create a string consisting of input source codes to be excluded (V=View, F=File Name, T=Table Name, Q=Query Definition, O=Source Object). Then load it into the %RW_Suppress$ global variable.