Developer Tools
Application Express
| How-To Document
Extend an Easy Report
Date: 25-Nov-2003
After completing this How-To, you should be able to understand:
Table of Contents
The Easy Report wizard allows you to create a report by choosing columns from tables instead of composing a SQL statement. After creating the report with the wizard, it may become necessary to extend the report by adding search capability or complex query conditions. This document aims to provide instructions for extending reports created using the Easy Report Wizard. Software Requirements
To create an Easy Report on the EMP table:
Figure 1: Easy Report on EMP Table
Extend Easy Report with Search Capability To add search capability, first add a text field item for the search criterion and a go button. Next, add a condition to the Easy Report to consider the search criterion. In this example, you will make the ENAME column searchable. To add the search text field item:
To add the Go button:
Running the page should look similar to the following figure. Figure 2: Adding a Search Field and Go Button To add the condition to the Easy Report:
Figure 3: Adding a Condition to the Easy Report Running the report page now should allow you to search by ENAME. Adding Complex Conditions to the Easy ReportThe report is now constrained by the user input for ENAME, but you may have the need for more complex criteria. For example, you may wish to only show records that match the search criterion, and are in departments 10 and 20, but you always want to show rows where the total compensation is over 2500. To accomplish this, you add another condition in the "AND" column, and one in the "OR" column. To add a complex condition as described above:
Figure 4: Adding Complex Conditions to the Easy Report The report page should now always show employees whose compensation is greater than 2500, and employees that match the search criterion that work in department 10 or 20. Additional ResourcesLearn more about customizing an Easy Report, such as adding hit-highlighting and pagination in the following documents. Customizing HTML DB Reports (Column headings and column formatting)
Discuss this how-to in the OTN HTML DB Discussion Forum. |