Setting a database role Converting from one format to another Improving performance using SQL statements

How To... 4-137 2. Does your data source have ODBC? If so, make sure that you have downloaded the JDBC-ODBC bridge from Sun Microsystems. This lets you use the JDBC connection mentioned in Step 1. If you do not know if there is an ODBC driver for your data source, check the company Web site. For example, Microsoft has a downloadable ODBC driver for Excel. 3. Is the file in XML? Oracle Reports includes an XML PDS. If the DTD file is available, all you have to do is select XML as your data type. If the DTD file is not available, you will have to create one. 4. Is the file comma-delimited? You can use the Text PDS included with Oracle Reports to query the data source. 5. Has someone in your company built a PDS for your data type? If the PDS exists, it will probably be on the Reports Server. Ask your administrator if such a file exists. If the PDS exists, add it to the classpath for your copy of Oracle Reports Builder. If the PDS does not exist, use the API Reference to help you build one. Examples Oracle Reports ships with XML data source sample files. See also The Pluggable Data Sources section of the Oracle Reports online Help, including the topics: ■ About pluggable data sources ■ Adding a pluggable data source ■ Connecting to a pluggable data source ■ Adding online Help to a pluggable data source ■ Pluggable data source interface definition ■ Troubleshooting PDS problems

4.16 Administer Oracle Reports Builder

This section provides procedures for the following tasks that you may perform as you administer Oracle Reports Builder: ■ Setting a database role ■ Converting from one format to another ■ Improving performance using SQL statements ■ Improving performance using WHERE clauses

4.16.1 Setting a database role

Before beginning this procedure, verify that the database administrator has created the role, granted privileges to the role, and granted the role to approved end users. Refer to your Oracle Application Developers Guide for more information. To set a database role for a report: 4-138 Oracle Reports Users Guide to Building Reports 1. In the Object Navigator, double-click the properties icon for the report to display the Property Inspector.

2. Under the Report node, set the Role Name property as defined by the database

administrator in the database. 3. Optionally, to set a Role Password, double-click the button in the Role Name value field to display the Set Role dialog box. Usage notes ■ The role settings in the report are overridden if you specify a role using the command line with Reports Runtime rwrun. ■ You can set only one role for a report. To set multiple roles, you need to set a role to which the other roles have been granted. See also Section 2.9.1, About database roles

4.16.2 Converting from one format to another

To convert one or more report definitions or PLSQL libraries from one storage format to another: ■ In Oracle Reports Builder, choose Tools File Conversion to display the Convert dialog box. ■ On the command line on Windows, type ORACLE_HOME\bin\rwconverter, followed by the report name and desired arguments.

4.16.3 Improving performance using SQL statements

Performing operations in SQL is faster than performing them in Oracle Reports Builder or PLSQL. The following are the most common cases where using SQL would improve performance: ■ Use a WHERE clause instead of a group filter or format trigger to exclude records. ■ Use the SUBSTR function to truncate character strings instead of truncating in Oracle Reports Builder. ■ Perform calculations directly in your query rather than in a formula or summary. Rationale: SQL can perform calculations more quickly than a summary or formula. WHERE and SUBSTR can reduce unnecessary fetching because they operate on the data during rather than after data retrieval. Improvements in performance become more noticeable when retrieving thousands of records versus a few records.

4.16.4 Improving performance using WHERE clauses