 |
|
Oracle Tips by Burleson |
Modifying the Query on the Report
In order for the report to use the new
P11_REPORT_SEARCH field for filtering, the query must be modified.
For this, a WHERE clause will be added to the SQL statement used to
populate the report.
1.
Click on the Conference - Confirmed Attendees link in the
Region section of the Page Definition page as shown in Figure 7.2.
2.
Modify the text in the Region Source, shown above, to what is
shown in the listing below. The ch7_2.sql file in the code depot
should be used.
3.
When the modification is complete, click Apply Changes.
4.
Run the report by clicking on the icon.
Enter the value AM in the Search field and either
press the Enter key or click the Go button. The filter is applied to
the results of the report.
Highlighting Words in a
Report
As we saw in chapter 4 when we did a search the
search word was highlighted in each of the fields wherever it was
found in the report. The next step will be to show you how to do that
in this report.
1.
Once again click on the Edit Page 11 link in the developer
toolbar.
2.
Click on the Report link as shown in Figure 7.2 to navigate
directly to the Report Attributes page.
3.
Click on the link
next to the LAST_NAME column.
4.
Go to the Highlight Words page item in the Column Formatting
region and enter the text: &P11_REPORT_SEARCH.
5.
Take note the trailing period that must be there as shown in
Figure 7.4. This is referred to as Exact Substitution.
6.
Click Apply Changes.
7.
Save time by using the button
in the upper right area of the Column Attributes page. This will
save the changes and navigate to each of the next columns in the
report. On the last page click Apply Changes.
8.
Repeat the setting of the Highlight Words page item for the
following report columns: FIRST_NAME, EMAIL, COMPANY, PAYMENT TYPE.
Test the work by running the report.
9.
Type in the text AM in the Search page item and press the Enter
key.
A full screen of results should be visible with
the text am in red, bold letters everywhere there is a match. Isn’t
this exciting! These are the kinds of things that are built into HTML
DB that eliminate developers from having to develop their own
programming logic to do it.
 |
For more details and scripts, see my new book "
Oracle
Tuning: The Definitive Reference", over 900 pages
of BC's favorite tuning tips & scripts.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot. |
|