|Oracle® Fusion Middleware Oracle Reports User's Guide to Building Reports
11g Release 1 (11.1.1)
Part Number B32122-01
Now that you have set up the parameters, the next step is to set up the target report to accept the parameters. Then, we will define the action for your Parameter Form. When a user clicks Run Report, the target report will be run based on the Department and User ID parameters.
The target report we use in this section is the sample report for the Oracle Reports Tutorial. If you completed the exercises in the Oracle Reports Tutorial and created
emprevb.jsp, you can use that report in this section. Otherwise, you can use the example file we have provided, called
emprev_final.jsp. We will not show the steps to build this report in this section.
For more information on building the sample JSP-based Web report, refer to the Oracle Reports Tutorial.
To set up the target report:
In Reports Builder, open the file we have provided called
In the Object Navigator, double-click the icon next to the Data Model node.
In the Data Model view that displays, double-click the query (Q_1) to display the SQL Query Statement dialog box.
Find the final line of the code:
WHERE (EMPLOYEES.MANAGER_ID = EMPLOYEES_A1.EMPLOYEE_ID) AND EMPLOYEES.DEPARTMENT_ID = 100
Change the second
WHERE clause so that the last line looks like this:
WHERE (EMPLOYEES.MANAGER_ID = EMPLOYEES_A1.EMPLOYEE_ID) AND EMPLOYEES.DEPARTMENT_ID = :P_DEPARTMENT
Tip:The code we have changed is in bold text.
A note displays that indicates a bind parameter has been created. Click OK.
Save your report as