Professional Documents
Culture Documents
12 SAMPLE TEMPLATES...................................................................................................105
1. Introduction This document describes how to generate various types of reports using Oracle BI Publisher. The output format for the reports can be designed using Microsoft word or Adobe Acrobat tools. Oracle BI Publisher allows creating reports from various data sources. The detailed steps for creating various reports using Oracle BI Publisher are discussed in detail in the forthcoming sections. 2. Installation of Oracle BI Publisher Before starting, we need to have access to or must have installed the following: Oracle Database 10g Oracle BI Publisher 10.1.3.3 or above Oracle BI Publisher Desktop
Oracle BI Publisher Desktop can be installed later by clicking the Template Builder Link in BI
After successful installation, the BI Publisher menu and BI Publisher toolbars are displayed in
the MS Word.
3. Getting Started 1.1. Logging In to Oracle BI Publisher Logon to BI Publisher If you have installed BI Publisher along with Oracle BI Enterprise Edition, then you can select
All Programs > Oracle Business Intelligence > BI Publisher from the Start menu
Otherwise use the URL for BI Publisher in a browser window which is of the format
http://<hostname>:<port>/xmlpserver/ (For example, http://chnmct139034d:9704/xmlpserver/) Logon to BI Publisher with username and password credentials.
Note: As you have logged in as the Administrator, the welcome page displays the Reports,
Schedules, and Admin tabs. For the users who do not have administrator privileges, the Admin tab will not be displayed. 1.2. Creating new Folder Create a new Folder with in My Folders or Shared Folders or Users as required.
1.3.
JDBC Connectivity
page.
Click the Admin tab. Click JDBC Connection found under the Data Sources section of the
In the JDBC Data Sources screen that is displayed click the Add Data Source to create a new
data source.
In the Update Data Source screen, enter the following details: for example, a sample connection string may look like: jdbc:oracle:thin:@myhost:1521:orcl
Username & Password: Provide the credentials Database Driver Class: oracle.jdbc.driver.OracleDriver (This is the default.)
A confirmation message will be displayed, saying Connection established successfully, then click Apply to save the connection details.
4. Creation of Simple Oracle BI Reports in various output formats Before you create a query based on Oracle Database, you need to define the connection as You can also add a new data source and define the connection details. To create a BI Publisher report based on a query directed to Oracle Database, perform the
explained above.
following steps:
1.4.
In this section, we can learn how to view the reports in XML format. In the forthcoming sections we can learn how to view the reports in various formats. 4.1.1 Creating new Report Create a new report Department_Details inside the created folder BI_Publisher_LabGuide
Enter the data model name select the type as SQL Query Choose the data source
Write the SQL Query SQL query can also be generated using SQL Builder which is discussed in the next example.
The output could be viewed only in the data format, as we have not created any template for the Click the view button to view the output. The output generated will be in the form of XML.
report.
10
You can also edit the report by clicking the Edit link.
1.5.
After editing, Save the report and view it as we have discussed already. Here we can view the above created report in various formats using Template.
Select the Layouts, and click the Generate button to create a new RTF template based on the A default template (New_Template.rtf) will be generated.
11
Save the report. Output is shown below with the generated default template. The output could be viewed in different formats.
4.2.2 Viewing the output in Default Template By clicking view one can see the output using default template.
Similarly we can view the report in various formats by selecting the desired output format.
12
4.3
Creation of RTF Template Open a word document and select Add-Ins->Oracle BI Publisher and log into by giving username and
password.
13
14
15
down button.
If one needs Group by function then you can select the column to be grouped. Click next.
If one need to sort a column then select the column to be sorted .Click next.
16
If you need to change the labels of a field, it can be done here. Click Finish and save the template.
The heading for the report can be given in the Header and page number in the footer.
17
Double click on Ename and go to Properties tab and click on Word Properties.
18
In word properties, select the text format. Also the Maximum length can be specified, if needed.
Similarly double click on date and select the date type and date format if needed.
19
Select the row and right click Borders and Shading Shading. Select the color, go to apply to column and select cell and give ok.
20
Now upload the created template by using the option Browse and upload in BI Publisher.
4.3.2 Viewing the output in HTML format The output can be seen by clicking on View.
21
Similarly the report can be viewed in various other formats available in the dropdown list.
5 Creation of report using e-text Template 5.1 Creating a e-text Template e-text Template are used to generate report output in text format Open a sample e-text template. Give ROWSET for the level. Enter the column names to be displayed within quotes. Give the format as Alpha. Select a delimiter to separate the column.
22
Give ROW for the level. Enter the column names as it from the query. Give the suitable format for each column. Select a delimiter to separate the column.
5.2
23
Save the changes. Viewing the Output Click View the see the output.
5.3
6 Creating Report Layouts using BI Publisher Desktop 6.1 Creating a new Report
BI_Publisher_LabGuide( Refer Section 4 for detailed steps for creating a new report)
24
6.2
Creating Query using Query Builder Select the table EMP and DEPT and check the required fields. Define a join between these two tables as follows:
Click the box beside the DEPTNO column in the DEPT table. (See the following screens.) Similarly click the box beside the DEPTNO column in the EMP table. These boxes when marked for joins turn to light gray. Also note that a fine line joining the tables appears in the Model canvas.
25
6.3
Create a new template from MS word (Refer section 4.3 for detailed steps) From MS Word application, log in to BI Publisher.
26
This displays the Open Template window. Ensure that BI Publisher is selected from the Navigate and select the Employee_Location_Details report that you have created from My Navigate and select the Employee_Location_Details report that you have created from My
In the Word document that loads this report, select Insert> Table Wizard on the BI Publisher
toolbar to define a format for the table data in the query. Create a template as given below:
yy
Change the format for the Hire Date data field to Date type and format to Insert header and footer for the created report. The template designed should look like as shown below.
d-MMM-
27
6.3.1 Publishing the template for a BI Publisher Report After making the necessary changes, upload the template by selecting Add-Ins->Oracle BI
Publisher->Upload Template As
A dialog box opens prompting to save the template in RTF. Click OK.
28
A dialog box pops, asking for the Template name. Enter the Template name. The same name
After successfully uploading, a dialog box pops stating that the template has been added to the
29
Save the report and view the output. You can see the template name as the name uploaded
6.4
Creating a RTF Template for building Charts Here we create a new template for creating chart and upload it in the same
Employee_Location_Details report. 6.4.1 Publishing multiple templates for a BI Publisher Report Create a new template design to view details in Pie Chart. (If not already opened) Open the BI Publisher report or else log in to BI Publisher.
30
In the Word document that loads this report, select Insert> Chart on the BI Publisher toolbar
Drag and drop the Ename for Values and Loc for Labels. Give an appropriate title.
There are various types of charts available like Bar graph, Pie Chart, Line Graph, Area Graph,
Ring Graph, Pareto Graph, Radar Graph etc. Select the one needed.
31
32
6.4.2 Alternative method to upload a template Template can also be uploaded from the BI Publisher. Browse the RTF template that has been
saved and upload it into the BI Report by clicking the upload button as shown below.
33
Enter the layout name and select the template, template type and output format.
Save the report and view the output. You can see the template name as the name uploaded
from MS Word.
34
6.5
Creating a RTF Template for building Pivot Table Here we create a new template for building Pivot table and upload it in the same
Employee_Location_Details report. 6.5.1 Publishing multiple templates for a BI Publisher Report Create a new template design to view details in Pie Chart. (If not already opened) Open the BI Publisher report or else log in to BI Publisher. In MS Word, select the BI Publisher> Open Template option.
In the Word document that loads this report, select Insert> Cross Tab on the BI Publisher
Drag and drop the Row values into the Layout region as shown below and click OK.
35
Change the word properties for all fields by double clicking on the field. Change the aggregate function in the code from sum to count. Click on the Properties tab and change the format and click OK.
Similarly change the properties for every field. Include headers and footers as shown below.
36
37
Create a new report. (Refer section 4 for detailed steps to create a new report)
Click on Edit link to modify the report. Create a new Datamodel.
Enter the data model name select the type as SQL Query
Start the MS Word application from the program menu. From the Oracle BI Publisher menu,
38
In the Login screen that appears, enter Administrator as the Username and Password, and click The first time when you connect, you may be asked for the report server URL, enter the URL
This displays the Open Template window. Ensure that BI Publisher is selected from the Navigate and select the Employee_Details report that you have created from My Folders>
39
Using Insert wizard select the columns needed to be displayed in report. The template you created looks like this:
Insert header and footer for the created template by selecting the Insert->Header and by
40
Upload the template as shown in section 6.4.1. Check for the uploaded template in the BI Publisher Report.
Save the report and view the output. You can see the template name as the name uploaded
from MS Word. View the output in different format. 7.2 Creation of Detail Report Similarly create another new report.
41
Enter the data model name choose the type as SQL query
42
Choose appropriate data type and parameter type based on your need.
43
7.2.3 Creation of RTF Template Create a new template design (Refer Section 4.3 for detailed steps for creating the template) This displays the Open Template window. Ensure that BI Publisher is selected from the Navigate and select the Employee_InDetail report that you have created from My Folders>
In the Word document that loads this report, select Insert> Table Wizard on the BI Publisher
toolbar to define a format for the table data in the query. This displays the Table Wizard. Select Form and click Next. In the next step, ensure that ROWSET/ROW is selected as the Grouping Field, and click Next. In the next step, click to include all the available columns in the table. Click Next.
In the next step, select any field from the Group by drop-down list if needed else click Next. In the next step, select any field from the Sort By drop-down list if needed. In the next step you can edit the labels of the columns as required. Click Finish. The template you created looks like this:
44
To change the format for the HireDate data field, double click on the field and select the
Insert header and footer for the created template by selecting the Insert->Header and by
45
7.2.4 Publishing the template for a BI Publisher Report After making the necessary changes, upload the template by selecting Add-Ins->Oracle BI
Publisher->Upload Template as
A dialog box opens prompting to save the template in RTF. Click OK.
46
A dialog box pops, asking for the Template name. Enter the Template name. The same name
After successfully uploading, a dialog box pops stating that the template has been added to the
47
Save the report and view the output. You can see the template name as the name uploaded
Select Layouts Browse the template which you have saved and upload it.
48
No rows will be displayed in the output because there are no values assigned for the Hidden Copy the path of the report as shown below:
parameter.
Note: If you want to check the output, set the default value of the parameter to some existing
Empno and view the output later delete the default parameter. 7.3 7.3.1 Drilldown from Summary to Detail report Inserting Hyperlink Open the Employee_Details summary report template. Choose the field(e.g. EMPNO) on which hyperlink has to be enabled right click on the chosen
field Hyperlink
49
7.3.2 Defining Parameter in RTF template Parameter has to be passed on to the detail report by appending the highlighted syntax at the At the end of the detail report URL include the following syntax
50
EMPNO (on the right hand side) is the alias name for the column EMPNO in the Employee Details summary report. Save the template. The template needs to be refreshed after placing the FORM field. Go to
BI_Publisher_LabGuide Employee_Details browse the template upload Save the report View. The output is shown below
51
8. Creating Reports with Group by Function 8.1 Creating a new Report Create a new report Employee_Details_Groupby inside the created folder
BI_Publisher_LabGuide
52
Enter the data model name select the type as SQL Query Choose the data sources and click the Query Builder button.
8.1.2 Creating Query using Query Builder Select the table EMP and DEPT and check the required fields. Define a join between these two tables as follows:
Click the box beside the DEPTNO column in the DEPT table. (See the following screens.) Similarly click the box beside the DEPTNO column in the EMP table. These boxes when marked for joins turn to light gray. Also note that a fine line joining the tables appears in the Model canvas.
53
Click Conditions, and move the DEPTNO, to appear first in the list (as shown in the screen
below).
54
View the generated SQL Query and the Results. This is the result for the generated SQL.
55
To change the format for the HireDate data field, double click on the field and select the
formatting type as Date and format. For example, d-MMM-yy and click OK.
56
Number and Number format to any of the format as needed. For example, $#,##0.00 to display the salary in dollar format and click OK.
Similarly, change the format for commission field and click OK. Left align the Salary and Commission fields.
Insert header and footer for the created template by selecting the Insert->Header and by The template designed should look like as shown below.
selecting Insert->Footer.
57
After making the necessary changes, upload the template by selecting Add-Ins->Oracle BI
Publisher->Upload Template As
A dialog box opens prompting to save the template in RTF. Click OK.
58
A dialog box pops, asking for the Template name. Enter the Template name. The same name
After successfully upload a dialog box pops stating that the template has been added to the
59
Save the report and view the output. You can see the template name as the name uploaded
60
8.2
Creating a new Report with Grand Total Create a new report Emp_GrpBy_Function. (Refer Section 4 for detailed steps for creating the Using Query builder generate the below query.
Report)
61
8.2.1 Creating a Layout Go to Layout and click on New for creating a Layout.
62
8.2.2 Creating a RTF Template Create a new template using Microsoft word (Refer section 4.3 for detailed steps for creating the Select the table for which the template is going to created i.e. Emp_GrpBy_Function. Using Table Wizard create a template as shown below.
Template).
After formatting the template as explained in section 4.3 , the final template will look as below.
63
64
9 Creation of Reports with Parameters 9.1 Creating a new Report with Default Parameter Click on Reports tab and create a new report Simple_Parameter .(Refer section 4 for detailed steps Using Query Builder generate the below query:. for creating the report.
65
9.1.1 Creating a new Parameter Click on Parameter and click New to create a new parameter.
66
Edit the query to give the bind variable, i.e. the name of the parameter.
If you want to give a default value give them and select the parameter type.
67
68
9.2
9.2.1 Creating a new Parameter Click on Parameter and click New to create a new parameter.
69
Edit the query to give the bind variable, i.e. the name of the parameter.
70
Give the display label and text field size. Check the option Text field contains comma-separated values , so that more than one employee
71
9.3
9.3.1 Creating a new Parameter Click on Parameter and click New to create a new parameter.
72
Edit the query to give the bind variable, i.e. the name of the parameter.
73
If you want give default date then enter the date in Default value column. Give the format for date and also enter the starting and ending Date.
74
If default date is not given then click View and enter the date in the prompt box.
9.4
75
Edit the query to give the bind variable, i.e. the name of the parameter.
76
Now enter the hidden parameter value in the default value box.
77
Save the work done. 9.4.2 Viewing the Output By clicking View the output is generated for the hidden parameter value.
9.5
9.5.1 Creating a new LOV Click on List Of Values and click New to create a new List of Values.
78
Now select the type i.e. SQL query or Fixed Data. Fixed Data is selected to give the values manually. By clicking on Add one can enter the value and its label name to be displayed.
79
SQL query is selected to generate query from query builder automatically. Connect to the Data Source and click on Query builder to fetch the query.
80
Edit the query to give the bind variable, i.e. the name of the parameter.
81
82
To select more than one value from the List of Values, check the option Multiple Selection.
To select All values from the LOV, then check the option can select all. To pass null values check that field or to pass all values check that field.
83
If more than one parameter is created and if one depends on the other then use the last option to
9.5.3 Viewing the Output If the option Multiple Selection in Menu Setting of parameter is selected.
84
85
10
Scheduling BI Publisher Reports Scheduling is a very important feature for any reporting system, which enables you to
schedule long-running reports, to be run at a specified time and date. This enables you to select a time and date at which the load on the system is low, to run your daily/weekly and/or monthly reports. In this topic, you configure the BI Publisher scheduler to schedule the reports and view the report history and saved output. 10.1 Configuring the BI Publisher Scheduler
On the Admin tabbed page, click the Scheduler Configuration link in the System Maintenance section.
86
On the Scheduler Configuration page: Select Oracle 10g from the Database Type drop-down list. Enter Connection String in the format: jdbc:oracle:thin:@<Host name>: <Port>:<SID> for example, a sample connection string may look like: jdbc:oracle:thin:@myhost:1521:orcl
Enter the Username and Password credentials (this is the scheduler user that you must have created as per step 4 of the prerequisites). Ensure that oracle.jdbc.driver.OracleDriver is selected as Database Driver Class.
87
After the tables are installed in the database, the below message is displayed:
88
On the schedule report page, select the template type and the format for the report. Enter Employee_Location_Details-Scheduled as the Job Name, and select appropriate language
and time options as per your requirements. Also, ensure that the Save Data for Republish and Save Output options are selected.
In the Time section of the scheduled report page, select any one of the four option to run the
Run Immediately Runs the scheduled report immediately after scheduling the report.
89
Run Daily/Weekly Runs the scheduled report weekly once or daily once at the selected day
of week and time. Also select the Active Start Date and End Date.
Run Monthly Runs the scheduled report monthly once at the selected month, day and time.
After selecting the option click submit which is found on the top and bottom right corner of the
90
After submitting the scheduling process, a confirmation message can be seen along with the
Report Schedules.
Click the History tab to view the report history. Note that the Data XML and Document Here you can see the status of the report as Running. Once the report has run the status Click the icon in the Document column to see the saved report.
columns are shown in the history table. automatically changes to Success(Keep refreshing the page)
91
10.3
92
After giving Apply you will able to see the following . We can give more than one server by clicking Add server and if we need to delete click on delete.
10.4
Scheduling Report to deliver output via Mail Logon to BI Publisher (if not logged) and open the Report tab. Select the Schedule link displayed below the report which you need to schedule.
93
On the schedule report page, select the template type and the format for the report. Select appropriate language and time options as per your requirements. Also, ensure that the Save
In the Time section of the scheduled report page, select any one of the four option to run the
Run Immediately Runs the scheduled report immediately after scheduling the report.
Now click the radio button for scheduling the reports to Email. Enter the Mail Id, Subject and Mail body details. If you need to send to more than one person then click on Add Destination.
94
After selecting the option click submit which is found on the top and bottom right corner of the
After submitting the scheduling process, a confirmation message can be seen along with the Report
Schedules.
Click the History tab to view the report history. Note that the Data XML and Document columns are
95
11
Bursting BI Publisher Reports Bursting is an important and useful feature of BI Publisher, which enables you to split a single
report based on a 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: Generation of pay slips to all employees based on one extract and delivered via e-mail 11.1 Scheduling a report to burst to a file location Click on Edit link mentioned below to go the report
96
On the Report Properties screen, click the Bursting node in the Report section on the left, to
In the General Properties section, select the Enable Bursting option, and then select ROWSET/ROW/DNAME from the Split By drop-down list and ROWSET/ROW/DNAME from the Deliver By drop-down list.
In the Delivery Data Source section, select BIP as the Data Source, and add the query in the
Bursting_Query
Before doing the bursting process, create a folder for e.g. D:\Salary. Mention the path of the created share folder in the Bursting query as shown below:
97
Click Save
Ensure that you saved the report after defining the Bursting Properties, and click Schedule to
This takes you to the Schedule page. Click Schedule a New Job to define the scheduling job.
98
Select the Run immediately option in the Time section and click Submit
99
Click the Schedules tab and then click History to see whether the schedule was run
Now go to the D:\Salary folder (the delivery destination folder you provided in the query). You
can see that the PDF files, which have <DName>. PDF as the titles, are bursted to this file location.
100
Open one of the files to see the report. For example, Accounting. PDF report file looks like this:
11.2
101
Now select the dummy column in the split by and deliver by column, so that the file will save as a
single file.
Now select the data source Write the sql query for bursting the report. In the Query the key should match the split by column.
102
11.2.3Viewing the Report The mail has been delivered to the recipient.
103
104
12
Sample Templates.
Simple_Parameter.rtf
Emp_GrpBy_Function .rtf
Employee_Details.rtf
Employee_etext_tem p.rtf
105