Professional Documents
Culture Documents
Purpose
This tutorial shows you how to create a PDF report that contains a table and graph utilizing two report queries.
Time to Complete
Approximately 15 minutes
Topics
This tutorial covers the following topics:
Overview
Prerequisites
Creating a Report Query With Multiple Queries
Creating a Report Layout Using Oracle BI Publisher Desktop
Invoking the Report from an Application Page
Summary
Viewing Screenshots
Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action
loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.)
Note: Alternatively, you can place the cursor over an individual icon in the following steps to load and view only the
screenshot associated with that step. You can hide an individual screenshot by clicking it.
Overview
Beginning with Oracle Application Express 3.1, a Report Query can contain more than one query. This allows you to
easily create a PDF file that contains the results of multiple queries. In this tutorial, you will create a Report Query with
two queries. The Report Layout consists of a table and a graph in one report layout. When the report is executed, the
PDF file will contain two reports in the one document.
Back to Topic List
Prerequisites
Before you perform this tutorial, you should:
1.
2.
3.
4.
5.
Configure Oracle Application Express for Advanced Report Printing. See document PDF Printing.
Download and unzip the apexprnt.zip into your working directory.
6.
7.
8.
Install Microsoft Word. Note that this OBE is only supported on Windows because of this requirement.
Install the Flash Player from Adobe.
Import the Printing Application in Application Builder using the printapp.sql file located in the directory where
you unzipped the file in the previous step.
Note: Within your development environment, in order for Oracle BI Publisher Desktop to work, Microsoft Word needs to
be installed. For end users to run the resulting application, the Oracle BI Publisher Desktop is not needed. Just the
appropriate application to open the file your application produces is needed; PDF reader, MS Word, MS Excel, etc.
Back to Topic List
Enter the following URL to log in to Oracle Application Express (change the <hostname> to localhost, your specific
hostname or apex.oracle.com).
http://<hostname>:8080/apex
2.
To log in to Oracle Application Express, enter the following details, and click Login.
Workspace: <your workspace name>
Username: <your username>
Password: <your password>
3.
4.
5.
6.
7.
Click Create.
8.
9.
11. Select the check box in front of each of the following columns and click Return.
FIRST_NAME
LAST_NAME
EMAIL
HIRE_DATE
JOB_ID
SALARY
17. Select the check box in front of each of the following columns and click Return.
OEHR_DEPARTMENTS.DEPARTMENT_NAME
OEHR_DEPARTMENTS.MANAGER_ID
OEHR_EMPLOYEES.FIRST_NAME
OEHR_EMPLOYEES.LAST_NAME
OEHR_EMPLOYEES.SALARY
19. The queries have been defined. In the next section of this tutorial, you create the report layout using Oracle BI
Publisher Desktop.
1.
From the Source Queries page in the Report Query wizard, click Download.
2.
Click Save and save the file as the default name multiquery.xml. Then close the download window.
3.
Open Microsoft Word. Select Oracle BI Publisher > Data > Load Sample XML Data...
4.
5.
6.
7.
You want all the columns under Rowset1Row to appear in the table. Drag Rowset1 Row to the Template area.
8.
9.
12. You now want to create a chart using the second query. Select Oracle BI Publisher > Insert > Chart...
15. Select Pie Chart for Type. Scroll down to the Title field and enter Total Salary Percentage by Department. Click
OK.
17. You need to save your layout as an RTF file. Select File > Save As... Select Rich Text Format (*.rtf) for Save as
Type, enter multiquery.rtf for File Name and click Save.
19. Click Browse... to select the RTF file you just created. Select the multiquery.rtf file and click Open.
21. In order to test your report, you need to first start BI Publisher. Double-click the Start BI Publisher icon on your
desktop
24. The table is populated with data, scroll down to see the chart.
25. Close the PDF report. On the Create Shared Query page, click Finish.
26. Your Report Query and Report Layout were created successfully. In the next section, you create a button on a page
that invokes the report.
1.
2.
3.
4.
5.
Enter Print Report for Button Name and select Download printable report query for Action and click Next.
6.
7.
Select [Top] from the list of quick links or select Top of Region from the drop down list and select Left for
Alignment and click Next.
8.
Select multiquery for the Report Query and click Create Button.
9.
10. You may be asked to login to the application. Enter your username and password and click Login.
Summary
In this tutorial, you learned how to:
Create a report query with multiple queries
Create a report layout using Oracle BI Publisher Desktop
Invoke a report from an application page
Back to Topic List
Place the cursor over this icon to hide all screenshots.