Modifying a query Using Query Builder Selecting HTML tags from the database

4-52 Oracle Reports Users Guide to Building Reports 4. Click in the main area canvas region of the window. 5. In the PLSQL Editor, type the PLSQL for a function that opens a cursor and returns a cursor variable of the REF CURSOR type you defined in the package. For example: empCur rcPackage.empCurType; BEGIN OPEN empCur FOR SELECT FROM emp; RETURN empCur; END; Note, rcPackage is a local program unit defined as: PACKAGE rcPackage IS TYPE empCurType IS REF CURSOR RETURN empROWTYPE; END; 6. Refine the query as desired: ■ Click the REF CURSOR query object, then choose Tools Property Inspector to modify properties. ■ Click the query object, then choose Tools Data Wizard to specify which fields to display, group fields, and any totals. 7. Repeat Steps 1 through 6 for each REF CURSOR query you want to create. See also Section 2.6.10, About REF CURSOR queries

4.8.2 Modifying a query

To modify a SQL query statement or the columns displayed in your report:

1. In the Data Model view, click the query object, then right-click and choose Data

Wizard .

2. To change the SELECT statement, click the Data tab.

3. To change the break groups, click the Groups tab.

4. To add or change summary columns for totals, click the Totals tab.

5. To change which selected database columns are displayed in your report, choose

Tools Report Wizard , then click the Fields tab. To modify the properties of a query:

1. In the Data Model view, click the query object, then right-click and choose

Property Inspector .

2. In the Property Inspector, modify the properties as desired.

Note: Oracle Reports supports both static and dynamic REF CURSORs. For more information, see Section 2.6.10, About REF CURSOR queries . How To... 4-53

4.8.3 Using Query Builder

You can use Query Builder to define almost any query that you would build using a SQL SELECT statement. Query Builder automatically generates the appropriate SELECT FROM [table.column] clause based on columns displayed in the Query Builder workspace. See the How To section of the Oracle Reports online Help for topics about using Query Builder. See also Section 1.7.5, About Query Builder

4.8.4 Selecting HTML tags from the database

To select HTML tags from the database: 1. Create a query, with a SELECT statement that selects a column containing HTML tags or the names of files that contain HTML tags. 2. In the Data Model view, double-click the HTML tags column to display the Property Inspector. 3. If the column contains the names of files that contain the HTML tags, rather than the HTML tags themselves: ■ Under the Column node, set the Read from File property to Yes. ■ Set the File Format property to Text. 4. In the Paper Layout view, create a field object that references the column. 5. Double-click the field object to display the Property Inspector.

6. In the Property Inspector, under the Web Settings node, set the Contains HTML

Tags property to Yes. Usage notes When the text objects Contains HTML Tags property is set to Yes, HTML tags and attributes are formatted in your report output as follows: ■ If the report is generated to HTML or HTMLCSS output, all HTML tags and attributes are interpreted and formatted in the output. ■ If the report is generated to other bitmap output formats for example, PDF, RTF, PostScript, a fixed set of HTML tags and attributes are interpreted and formatted in the output, as described in Section 2.8.9, About HTML formatting . Any HTML not in the supported set of tags and attributes are not interpreted, and appear as is in the report output. Note: This procedure applies to paper-based reports. 4-54 Oracle Reports Users Guide to Building Reports

4.8.5 Selecting an image from the database