Creating a list of values LOV for a parameter Validating a parameter value at runtime

4-102 Oracle Reports Users Guide to Building Reports

1. In the Object Navigator, expand the Data Model node, then click the User

Parameters node. 2. Click the Create button in the toolbar. 3. Double-click the properties icon for the new parameter to display the Property Inspector.

4. Under the General Information node, replace the Name property with the desired

parameter name.

5. Under the Parameter node, set the Initial Value and List of Values properties, if

required. 6. To validate the parameters value at runtime, set the Validation Trigger property by clicking property field to display the PLSQL Editor and define the PLSQL to be triggered at runtime.

4.11.3 Creating a list of values LOV for a parameter

To create a LOV for a parameter:

1. In the Object Navigator, expand the Data Model node, then the User Parameters

node.

2. Double-click the properties icon for the parameter for which you want to create a

LOV to display the Property Inspector.

3. Under the Parameter node, double-click the List of Values property field to

display the Parameter List of Values dialog box.

4. Select the type of list that you want to create:

■ For Static Values, type a value in the Value text box and click Add. Repeat for each value you want to add. Click Remove to delete items from the list ■ For SELECT Statement, type a query to populate the list of values. You can select more than one column to display in the LOV, where the first column contains the value to be assigned to the parameter. The LOV displays columns in the order specified in the query.

5. If you want the parameter value to be restricted to only those in the LOV, select

the Restrict List to Predetermined Values check box. To display a combo box that allows users to edit values or type a different value in the Runtime Parameter Form, clear the check box.

6. If you do not want the first column which contains the parameter value of your

query displayed in the LOV, select the Hide First Column check box. If there is no need to preserve the confidentiality of the first column, clear the check box. Tip: If you define a parameter in a template, you must apply the template to a report in order to select that parameter for the Runtime Parameter Form. How To... 4-103

7. Click OK.

4.11.4 Validating a parameter value at runtime

To validate a parameter value at runtime:

1. In the Object Navigator, expand the Data Model node, then the System

Parameters or User Parameters node. 2. Double-click the PLSQL icon for the parameter for which you want to add a PLSQL validation trigger.

3. In the PLSQL Editor, define the PLSQL to be triggered at runtime.

See also Section 2.6.13.3, About validation triggers

4.11.5 Creating a default Parameter Form