This tutorial covers some of the advanced features of Oracle Business Intelligence Publisher (Oracle BI Publisher), such as configuring advanced report options, creating a report with hyperlinks, scheduling a report to burst to a file location and email, analyzing data using the online and Excel analyzers, creating a report based on a data template, and creating a report based on multiple data sources.
Note: This tutorial is intended for the learners who are already familiar with Oracle BI Publisher and want to try out some of the advanced features, and who have already completed the tutorials: "Getting Started with Oracle Business Intelligence Publisher", and "Integration of Oracle BI Publisher with Oracle Business Intelligence Enterprise Edition."
Approximately 1 hour
This tutorial covers the following topics:
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 each individual icon in the following steps to load and view only the screenshot associated with that step.
You have already learned that Oracle BI Publisher (formerly known as XML Publisher) is a revolutionary reporting and document output management solution from Oracle, which can be used as a stand-alone reporting product, or integrated with Oracle Business Intelligence Enterprise Edition. You have explored many features of BI Publisher in the "Getting Started with Oracle BI Publisher" OBE, such as creating reports from various data sources—for example, Oracle Database, Web services, RSS feeds, Files, BI Answers, BI Server subject area—and also creating templates using BI Publisher Desktop in MS Word.
Oracle BI Publisher also enables you to create linked reports, create reports from XML data templates and multiple data sources, analyze data using online and Excel analyzers, bursting the reports to files and email, and so on. In this tutorial, you will be guided to explore these advanced features of BI Publisher.
You will be using some of the reports that you have created in the other OBEs "Getting Started with Oracle Business Intelligence Publisher" and "Integration of Oracle BI Publisher with Oracle Business Intelligence Enterprise Edition." For example, you will use the simple employee salary report that you created based on the Oracle Database, and also other reports such as the report based on Web services, the report based on BI Server, and so on.
So, to continue with the steps listed in the topics, you should have completed the two OBEs listed above, installed the required software, and performed the other setup as mentioned in the Prerequisites topic.
Before starting this tutorial, you should:
1. | Have access to or have installed Oracle Database 10g (preferably version 10.2)
|
|
2. | Have access to or have installed the sample schemas (specifically HR, OE, and SH)
|
|
3. | Have access to or have installed Oracle BI Publisher and Oracle BI Publisher Desktop 10.1.3.2. You can install BI Publisher Desktop by clicking the Template Builder link in BI Publisher:
When you have successfully installed BI Publisher Desktop, the BI Publisher menu and BI Publisher toolbars are displayed in MS Word.
|
|
4. | Have completed the tutorials "Getting Started with Oracle Business Intelligence Publisher" and "Integration of Oracle BI Publisher with Oracle Business Intelligence Enterprise Edition."
|
|
5. | Have set up the email server (ArGoSoft Mail Server Freeware) as given below: Note: This tutorial uses ArGoSoft Mail Server Freeware for demonstration purposes only. If you do not have a mail server, follow these steps: 1. You can download this freeware mail server here.
9. Click Tools > Option on the menu bar. The Options window appears.
10. Launch your email client. This OBE uses MS Outlook Express. Ensure that all user properties correspond to the information annotated above. To do so, perform the following steps:
Note: Screen captures for this tutorial were taken in a Windows XP environment, therefore Start menu options may vary slightly. |
In this topic, you will create a simple report based on the data from the Oracle Database (which contains the department location details), create a template for the report, and link it to the employee salary report (named Based on Oracle DB) that you have created in the OBE "Getting Started with Oracle Business Intelligence Publisher." Then you will view the data in BI Publisher by drilling down to another report.
To create a report with a hyperlink, perform the following steps:
1. |
Log in to BI Publisher as Administrator.
On Windows, you can invoke BI Publisher as follows:
|
2. | Navigate to My Folders > Learn (you created this folder in the "Getting Started..." OBE).
The report is displayed in the Learn folder in BI Publisher.
|
3. | In the General Settings section of the Report Properties, select demo from the Default Data Source drop-down list.
Click Data Model and click New to define the data source for this report.
|
4. | In the Data Set screen that appears,
ensure that SQL Query is selected as Type, and demo is selected as Data Source.
|
5. | The Query Builder screen appears. Ensure that HR is selected from the Schema drop-down list.
Note: When you define a connection to the OE schema, it also gives you access to HR schema.
|
6. | Define joins between these tables as follows:
After defining the joins, the screen appears as below:
|
7. | Select the following columns from the tables (by selecting the check boxes beside the column names):
Note: Do select the DEPARTMENT_ID column even if you do not want to display it in your report. Also, you can click View to view the XML data to see whether the query is rendering data to the report.
|
8. | Now edit the Based on Oracle DB report (the employee salary report by department) that you created in the "Getting Started..." OBE. Click Edit to open this report in edit mode. Click the Parameter node on the left and click New to create a parameter. Enter dept_id as the Identifier, select Integer from the Data Type drop-down list, and select Text from the Parameter Type drop-down list .
Click Save to save the changes to this report. Now edit the data model to include this parameter, so that the query looks like below: select DEPARTMENTS.DEPARTMENT_NAME as DEPARTMENT_NAME,
|
9. | In BI Publisher (Web), copy the URL for the Based on OracleDB report. Now open the LinkedReport.rtf template file provided with this OBE and save it with the same name on your system. Open this file in MS Word, which contains a simple table with Department Name, City, and Country Name columns:
In MS Word, log in to BI Publisher as Administrator.
Select Preview Template as > PDF to view the report in PDF format:
Note: Do not close the template file or the MS Word application.
|
10. | Insert a hyperlink for the DEPARTMENT_NAME column in the table by using the Insert > Hyperlink menu option in
In the Insert Hyperlink window that appears, paste the URL of the Based on OracleDB report that you copied earlier, and
add the following at the end: ?dept_id={DEPARTMENT_ID}. Save the file. Preview the template as PDF,and ensure that the links are working fine. |
11. | MS Word has a known limitation on the length of the URL in a hyperlink. If the links are not working properly, then try the following: Then edit the hyperlink to use this variable as: {$report_url}?dept_id={DEPARTMENT_ID}
|
12. | Now preview the report as PDF and check the links.
If you click the Accounting link, the employee salary report for this department is displayed in BI Publisher.
You can also open the Linked Report directly in BI Publisher now and drill down on a department to view the employee salary report for that department . |
Oracle BI Publisher provides an online crosstab analyzer to analyze data. You can also analyze the data using the Analyzer for Excel, an add-in provided for MS Excel. In this topic, you will use the From BI Server report that you created in the OBE titled "Integration of Oracle Business Intelligence Publisher with Oracle Business Intelligence Enterprise Edition".
Using Online Analyzer | ||
Using the Analyzer for Excel |
1. | if not logged in, log in to BI Publisher as Administrator.
Click Analyzer to open the online crosstab analyzer.
The BI Publisher Online Analyzer screen appears.
|
2. | On the BI Publisher Online Analyzer screen, from the ROWSET fields on the left drag the following to the areas as shown in the screenshot below:
The crosstab looks like this: (A portion of the screen is shown here, observe the structure of the crosstab)
|
3. | This feature helps you to quickly create a pivot table and analyze the data in the report online.
Close the online analyzer after your analysis is done. You can also change the structure of the crosstab according to the requirements of your data analysis and come up with some important business decisions or initiatives. |
1. | Go back to view the From BI Server report , and click Analyzer for Excel.
You will be prompted to save or open the <report name>.xls file.
Note: You must enable macros to use the Analyzer for Excel.
|
2. | The report data is rendered in the MS Excel application window and the Oracle BI Publisher menu appears on the Excel menu bar. You can now manipulate the data as you want in Excel. Note: If the report has parameters, the parameter names appear at the top of the worksheet, but you must log in to apply new parameter values.
|
3. | You must log in to enable all the menu options in the BI Publisher menu.
Note: The first time you use the Analyzer for Excel, or if you do not have the latest version of Analyzer for Excel, you will be prompted to install the latest version.
|
4. | After logging in to BI Publisher, you can see that the various options in the BI Publisher menu are active. Using these options, you can perform tasks such as viewing the report online, seeing the parameters, updating a template, uploading a new template, and so on.
You can see that a worksheet is added with the name <report name>.html that shows the data of the report using the template selected.
|
5. | You can make modifications in the Excel template to update the template or add it as a new Excel template.
In step 1, select Pie as the chart type and select the subtype as shown:
Accept the default options in step 2.
In step 3, change the chart title to Product Sales Revenues.
In step 4, select the option to represent the chart in the From BI Server.html sheet (as shown below) , and click Finish.
Note that the chart is added in the sheet. Adjust the position of the chart so that it is placed at the top of the table in the From BI Server.html Excel sheet. The sheet looks like this:
|
6. | Now you can add this as a new Excel template for the BI Publisher report.
Enter New Excel Template1 as the name and click OK.
The following message is displayed:
You can save this file with an appropriate name on your file system. Close the Excel application.
|
7. | (If not logged in) Log in to BI Publisher as Administrator, and open the From BI Server report from
|
8. | Select the option to enable macros in MS Excel to open the report.
Similarly, you can add multiple Excel templates in different formats or update an existing template format too. Note that you can also perform tasks such as viewing a report online, browsing for reports online, and so on by using the BI Publisher menu in Excel.
|
In this topic, you configure some of the advanced settings for the reports and are also guided through the steps for report delivery configuration.
Configuring PDF Security Options for a Report | ||
Delivery Configuration |
1. | Go back to the View mode of the From BI Server report.
|
2. | This opens the Runtime Configuration page, observe the settings on this page.
Scroll down and see other settings. Also, note that font settings can also be modified from the Font Mappings tabbed page. |
3. | Now go back to the View mode of the From BI Server report.
|
4. | You are prompted for a password to open the PDF document.
The report is now displayed as PDF:
If you have time, try out the other configuration settings.
|
The report delivery can be configured to reach destinations such as email server, FTP server, printer, and so on.
Email configuration is shown here (for the email configuration to work, you should have set up the ArGoSoft Mail Server Freeware as mentioned in the step 5 of the Prerequisites topic):
1. | Log in to BI Publisher as Administrator (if not logged in), and click the Admin tab to open the Admin page.
|
2. | Click Delivery Configuration. This opens the Delivery Configuration page. Observe the various delivery media that can be configured for the reports.
On the Email configuration page, click Add Server.
|
3. | On the Add Server page, enter Email Server as the Server Name; enter your host name (where you have installed the ArGo Soft mail server)—for example, myMailServer.myCompany.com; enter the port number for the mail server; and enter the username and password details.
After the server is added, it appears on the Email page of Delivery Configuration.
Note: You can add multiple email servers, and set one of them as the default mail server by selecting the Set as Default option. Also, you can configure FTP server, printer, and so on. |
In the "Getting Started..." OBE, you have configured the scheduler and have also scheduled a report. In this topic, you will schedule reports to use some more of the advanced features.
Note: It is mandatory to go through the "Getting Started..." OBE, and you should have configured the scheduler. Also, note that for the email to work, you should have set up the mail server as given in step 5 of the Prerequisites topic, and you should have done the email delivery configuration according to the previous topic.
Scheduling a Report to Deliver As an Email Attachment | ||
Scheduling a Report to Burst to a File Location | ||
Scheduling a Report to Burst to Email |
Scheduling a Report to Deliver As an Email Attachment
In this topic, you schedule a report as an Email attachment:
1. | (If not logged in) Log in to BI Publisher as Administrator, and open the Category Sales and Profits for last 12 months report in View mode from My Folders > Learn.
|
2. | On the Schedule Report page:
Scroll down to see other settings.
This scheduled job is displayed on the Schedule page.
Click the Schedules tab and click History to see whether the report is scheduled and delivered successfully.
|
3. | Now open Outlook Express (or the mail client that you have configured) and log in to the mail as the user configured. When the report is successfully completed and delivered to the Inbox, you can see both the notification mail and the scheduled report.
Open the attachment in the Category Sales and Profits mail to see the scheduled report.
|
Scheduling a Report to Burst to a File Location
Bursting is an important and useful feature of BI Publisher, which enables you to split a single report based on a key in the report data and deliver the report based on a second key in the report data. Driven by the delivery key, you can apply a different template, output format, delivery method, and locale to each split segment of your report.
Following are some example scenarios where bursting can be implemented:
In this topic, you are guided to create a report based on a SQL query, which contains the salary expenses of the direct reports of all the managers in the organization, and then you use this report to burst to a file location.
1. | (If not logged in) Log in to BI Publisher as Administrator.
|
2. | The report appears on the BI Publisher page. Click the Edit link found below the name of the report to edit the report.
The report is displayed in Edit mode. Click the Data Model node and then click New to define the data model for the report.
|
3. | On the Data Set screen that appears on the right,
ensure that SQL Query is selected as Type, and demo is selected as Data Source. select e.first_name || ' ' || e.last_name name, e.first_name, e.last_name, e.salary, e.salary*12 ANNUAL_SALARY, e.salary*12*0.28 FED_WITHHELD, j.job_title, d.department_name, m.first_name || ' ' || m.last_name manager from employees e, employees m, departments d, jobs j Click Save to save the report.
Note: You can click View to see if the query is returning valid XML data.
|
4. | Now open the Salary Expenses by Manager. RTF template file provided with this OBE.
Now log in to BI Publisher from MS Word as Administrator.
|
5. | In the Open Template window that appears, navigate to My Folders > Learn and open the Bursting to File report that you created. (Ensure that BI Publisher is selected as the Workspace.)
Select Preview > PDF to view the report in PDF format:
|
6. | Now select the Publish Template As... option from the Oracle BI Publisher menu in MS Word.
Enter Template1 as the name and click OK.
This uploads the template for the report, and displays the following message:
|
7. | Now go back to BI Publisher and open the report , and open the Bursting to File report in Edit mode.
On the Report Properties screen, click the Bursting node in the Report section on the left, to define bursting properties for the report.
|
8. | This displays the the Bursting Properties screen on the right.
In the Delivery Data Source section, select demo as the Data Source, and add the following query in the SQL Query section: Click Save to save the changes you made to the report.
Important Notes: Based on the SQL Query that you provide in the Delivery Data Source section on the Bursting Properties page, BI Publisher will build the delivery XML data set.
|
9. | Ensure that you saved the report after defining the Bursting Properties, and click Schedule to schedule this report to burst to the file location defined.
This takes you to the Schedule page. Click Schedule a New Job to define the scheduling job.
|
10. | On the Schedule Report page that appears, define the following:
Scroll down to define the other options.
This displays the message saying the job is successfully created.
|
11 | Click the Schedules tab and then click History to see whether the schedule was run successfully.
|
12. | Now go to the C:\BIP folder (the delivery destination folder you provided in the query). You can see that the PDF files, which have <Department Name>. PDF as the titles, are bursted to this file location.
Open one of the files to see the report. For example, Sales. PDF report file looks like this:
Note: You can also connect to the mail server as the configured user and you can see the notification sent when the job is scheduled successfully.
|
Scheduling a Report to Burst to Email
You have already bursted a report to a file location; now you use the same report to burst it as email.
1. | The first step is to copy and rename the Bursting to File report.
Using the commands in the Folder and Report Tasks section, copy and paste the Bursting to File report.
Rename the copied report as Bursting to Email.
|
2. | Click the Edit link below the name of the report to edit this report.
On the Report Properties screen, click the Bursting node in the Report section on the left, to define bursting properties for the report.
|
3. | This displays the Bursting Properties screen on the right.
In the Delivery Data Source section, select demo as the Data Source, and add the following query in the SQL Query section: select
d.department_name KEY, (See the screen below) Click Save to save the changes to the report.
The parameter mapping for bursting to email is shown below:
Note: Parameter 6 must be set to true if the delivery format selected is PDF.
|
4. | Click Schedule to schedule this report, and click Schedule a New Job on the Schedule page, to define the scheduling job. |
5. | On the Schedule Report page, define the following:
Scroll down to define the other options.
This displays the message saying the job is successfully created.
|
6. | Click the Schedules tab and click History to see whether the schedule was run successfully.
You can also check the mail for the notification and files. |
Another salient feature of the BI Publisher data engine is that it enables you to rapidly generate any kind of XML data
structure against any database in a scalable and efficient manner. The data template is the
method by which you communicate your request for data to the data engine. It is an
XML document whose elements collectively define how the data engine will process the
template to generate the XML.
The data template is an XML document that consists of four basic sections: define parameters, define triggers, define data query, and define data structure. An example of this structure is illustrated on the following screen:
In this topic, you create a report by defining a simple data template and structure for the XML data.
1. | Ensure that you are logged in to BI Publisher as Administrator, and navigate to My Folders > Learn.
Enter Based on Data Template as the name of the report and click Create.
Click the Edit link below the name of the report created to edit the report.
On the Report Properties page that appears, click the Data Model node on the left and click New to define the data model for the report.
|
2. | On the Data Set screen that appears on the right, select Data Template from the Type drop-down list in the General Settings section.
This displays the basic structure for the data template. Copy this code in the Data Template section: <dataTemplate name="firstDT" dataSourceRef="demo">
</dataTemplate> (See the screenshot below.)
Click Save to save the report. Note: The data source reference defined in the code should point to your database connection. In this case, it is demo, the connection to the OE/HR schemas of the database.
|
3. | Click View to see the XML data to check whether the data is rendered to the report.
|
4. | Now structure the XML in the data template that you have defined. <dataTemplate name="firstDT" dataSourceRef="demo">
</dataTemplate> See the screenshot below:
Do not forget to save the changes each time you modify a report. Click Save to save the changes.
|
5. | View the XML data of the report, and observe the changes in the structure.
|
6. | Like other BI Publisher reports, you can also create the RTF template file in MS Word for the Based on Data Template report.
Log in to BI Publisher as Administrator from MS Word, and open the Based on Data Template report.
Select Preview > PDF to preview the report in PDF.
Publish the template as Template1 for the report. Note: A simple data template report is created in this exercise, but you can define a complex data template with parameters and triggers.
|
BI Publisher enables you to create a report from multiple data sources. This feature is very useful because you can pull the data into a single report based on multiple data sources—for example, on the report which shows the employee details, you may also want to show the stock information for your organization. In this topic, you will create a single report that uses the data template report you created in the previous topic (Based on Data Template), and also the report that you created based on Web services (Based on Web Services) in the "Getting Started..." OBE.
1. | Click the report icon beside the Based on Data Template report in My Folders > Learn. Using the commands in the Folder and Report Tasks section, copy the Based on Data Template report.
Rename the copied report as Based on Multiple Data Sources.
|
2. | Click Edit to edit the Data Model for the report.
Click New Data Set2 (created above); this opens the Data Set page on the right.
|
3. | Create a parameter Quote with the following properties:
Also, click the New Data Set2 data model, and add the Quote parameter that you have created to this data set. The screen looks like this:
|
4. | Click the Data Model node, and select Concatenated SQL Data Source from the Main Data Set drop-down list. Select the Make row names unique check box, and click Save .
|
5. | Click View to see whether the XML data is rendered to the report.
Note: Like other BI Publisher reports, you can create and publish the templates for this report in MS Word by using BI Publisher Desktop. A sample template is shown below:
|
In this tutorial, you learned how to:
Create a report with a hyperlink to another report | ||
Analyze the data by using online and Excel analyzers | ||
Configure advanced options such as email and PDF security for the reports | ||
Schedule a report to deliver as an email attachment | ||
Schedule a report to burst to a file location and email | ||
Create a report from a data template | ||
Create a report from multiple data sources |
Place the cursor over this icon to hide all screenshots.