WebFOCUS Online Help > Managed Reporting End User > Creating a Report With Report Assistant > Selecting Records for a Report
In this section: |
When generating a report and specifying which fields to display, you may not want to show every instance of a field. By including selection criteria, you can display only those field values that meet your needs. In effect, you can select a subset of the data, which you can easily redefine each time you issue the report request.
When developing a report request, you can define criteria to select records based on:
The Selection criteria tab enables you to create Where or Where Total statements for record selection.
Where and Where Total statements enable you to display only those records that pass your selection criteria. These statements select the data source records to be included in a report. The data is evaluated according to the selection criteria before it is retrieved from the data source. Use the Selection criteria tab to create a new Where or Where Total statement.
Note: In the Report Assistant, when you create a Where statement in the Selection criteria tab for a range of dates using FROM - TO, you will not be alerted if the TO field is chronologically before the FROM field. For example, if you enter something like "from 12/31/05 to 1/1/05", there will be no records in the resulting report.
or
Press Alt+M to go to the Available Fields window, tab to the field and press Enter to add the chosen field.
The field name and EQUAL to and Select values appear in the Screening conditions pane.
After you click OK, the constant, vehicle, appears in the WHERE statement which reads BODYTYPE EQUAL to vehicle.
You can set parameter properties, for details see Setting Parameter Properties.
After you click OK, the parameter, &moped, appears in the WHERE statement which reads BODYTYPE EQUAL to &moped.
Note: The ampersand is automatically added by WebFOCUS.
After you click OK, the field BHP appears in the Where statement which reads CAR.COMP.CAR EQUAL to CAR.SPECS.BHP.
After you click OK, the value, Audi, appears in the Where statement which reads CAR.COMP.CAR EQUAL to AUDI.
In the Report Assistant,
or
Press Alt+M to go to the Available Fields window, tab to the field and press Enter to add the chosen field.
After you click OK, the value, 1989/01/18, appears in the WHERE statement which reads START_DATE EQUAL to 19890118.
When developing a query, you can use a locally saved, external file as selection criteria to limit query results. This enables you to quickly build a query containing a large number of WHERE statement values without having to manually enter repetitive or readily available data.
Valid options include EQUAL to, NOT EQUAL to, IN literal list, NOT IN literal list, EXCLUDES literal list, and INCLUDES literal list.
The Values dialog opens.
A dialog box opens as shown in the following image.
A standard file selection dialog opens.
Note: The external file must only contain text with new line delimiters.
The values contained in the file are displayed in the Multiple values entered list in the right pane of the dialog.
You can save the query for future use and reopen the query to append new or remove existing values.
When you create parameters for Selection Criteria (WHERE statements) you can set the properties for the parameter. For example, you can create a dynamic or static list of values to choose from at run time.
The Variable Editor dialog box opens.
The Parameter Properties dialog box opens.
Note:
The Dynamic option is selected by default.
Optionally, choose the Select multiple values at runtime check box to provide multiple values to the report from the auto prompt page at run time.
For the Dynamic selection type, the Data Source and Field values are selected by default based on the field you are screening on and can be changed as needed.
If you want to see the fully qualified Field name, select the Display fully qualified field name check box. This setting is for display purposes only and is not preserved.
Note: When working with a Reporting Object, you can select only fields from data sources that the Reporting Object is defined to access.
For the Static selection type, select the Constant or Show field values option. For Constant, enter one or more values. For Show field values, all of the values for the selected field appear in the list box. Move the values you want from the selection list to the Prompt values list.
Operator |
Enabled for the Variable editor? |
---|---|
Equal to |
Yes |
Not equal to |
Yes |
Greater than |
Yes |
Less than |
Yes |
Greater than or equal to |
Yes |
Less than or equal to |
Yes |
In literal list |
No |
Not in literal list |
No |
Missing |
No |
Not missing |
No |
From - to |
No |
Not-from - to |
No |
Includes literal list |
Yes |
Excludes literal list |
Yes |
Contains characters |
Yes |
Omits characters |
Yes |
Like character mask |
Yes |
Not like character mask |
Yes |
Use the right pane of the Selection criteria tab to use or delete existing Where statements and to combine expressions.
You can use parentheses to group expressions together to optimize the Where statement.
Click the grayed out parentheses to activate the parentheses and group expressions together.
WebFOCUS |