Was this helpful?
Runtime Data Selection
Users often must limit the data that goes into a report. For example, a table can contain sales figures for the past three years, but you only want a report on sales data for the previous quarter. You can use the Column Options frame to specify that RBF ask the user to enter criteria for the data to be selected from that column when the report is run. This is called runtime data selection.
Runtime data selection is specified on a column-by-column basis. If the report has a Date column, and you specify a runtime data selection range for that column, each time a user runs the report RBF can ask the user to enter a minimum (earliest) date and the maximum (latest) date. The resulting report can only contain data from rows in which the date falls within the specified range.
You can specify runtime data selection on more than one column. For example, you can specify a runtime data selection for both the Date and Customer columns. In this case, the user could specify a range of dates for a particular customer at report runtime.
You can specify runtime data selection for both sort and nonsort columns.
Enter options in the Selection Criteria column on the Column Options frame to specify whether RBF must use runtime selection criteria. The Column Options frame provides three runtime data selection criteria options, as shown in the following table. You must specify one of these options for each column in the report.
Option
Effect at Runtime
none (or n)
No runtime selection criteria for this column. This is the default. All data is presented in the report.
value (or v)
You are asked to enter a specific value at runtime.
range (or r)
You are asked to enter a maximum and minimum range of values at runtime.
In a default report specification, all columns are set to the none option (no runtime data selection).
Each time a user runs a report for which the value or range runtime data selection option has been specified, RBF asks the user to enter the selection criteria before running the report:
Value - If the selection criterion is a value, the user enters the value.
Range - If the selection criterion is a range, RBF prompts the user to enter first the minimum value of the range and then the maximum value of the range.
Hexadecimal Constants
To specify a nonprintable character, you can use a hexadecimal string constant with the following format:
X|x'nn{nn}'
The introductory X identifies the string as a hexadecimal string constant. You must specify the nonprintable character as two hexadecimal digits (nn) in the range 0‑9, a‑f, or A‑F, and the string must contain an even number of characters. There must be no intervening white space between the X and the single‑quoted string of hexadecimal digits. The X and the hexadecimal digits are case insensitive. RBF translates the hexadecimal constant into its corresponding character value.
Null Values for Numeric Variables
If the user does not enter a value at runtime for a numeric variable with runtime qualification, RBF issues an error message. To avoid this circumstance, application developers have the following options:
Quote the variable in the query by archiving the RBF report specification and editing it in Report-Writer.
If the user does not enter a variable, RBF interprets the quoted empty variable as a value of zero. This procedure is not recommended for fields in which this behavior is semantically incorrect—for example, in nullable fields. Once you have saved a report specification with the archive command, you can no longer edit it in RBF.
Supply the variable value in a call report statement, or require the user to supply it on the command line, so the value is ensured to exist; then call Report-Writer to run the report.
Last modified date: 08/28/2024