Home > Building Your Application > Linking the Employees and D... > Linking the Item to the Report
![]() Previous |
![]() Next |
At this point, you have created the item, but it is not linked to the report. To link it to the report, you must edit the Region Source and add a WHERE
clause.
To link the item to the report:
Under Regions, click the Employees link (next to Report).
Scroll down to Source.
In Region Source, add the following after the existing code:
WHERE (DEPARTMENT_ID = :P3_DEPARTMENT_ID or (DEPARTMENT_ID is null and nvl(:P3_DEPARTMENT_ID,'1') = '-1'))
This WHERE
clause changes the query to display only those employees that belong to the selected department.
Click Apply Changes.