You are on page 1of 161

ORACLE BUSINESS INTELLIGENCE

ENTERPRISE EDITION 11g

HANDS-ON PRACTICE MANUAL

TABLE OF CONTENTS

PART I
LAB5.3: B I PUBLISHER 11G SETUP AND CONFIGURATION 270

LAB5.3: B I PUBLISHER 11g SETUP AND CONFIGURATION


Goals

2
This tutorial covers how to get started with Oracle BI Publisher 11.1.1.6.0 and later versions to
create simple reports. It teaches you how to create a data model, and a report layout using the
online Layout Editor. In addition, you will learn how to schedule reports.
Outcome
Purpose

Time to Complete

Overview

Software Requirements

Prerequisites

General Navigation and Preferences

Creating a Data Model

Creating Reports

Creating Report Jobs / Scheduling Reports

Summary

Resources

Time
Approximately 2 hour

Getting Started with Oracle BI Publisher 11.1.1.6.0

3
Software Requirements

The following is a list of software requirements:

 Oracle BI EE 11.1.1.6.0 or later version is installed.


 It is recommended to use the browser Mozilla Firefox 3.6.3 (or later versions).
 Oracle Database 11g

Prerequisites

Before starting this tutorial, you should:

1. Download the Salary Report Datamodel. zip file to your local machine and
unzip it. This contains a predefined data model Salary Report
Datamodel.xdmz. You will use this file in the tutorial practice to upload a
resource object to the catalog folder.
2. Have access to an Oracle Database11g with the sample schema OE
installed and unlocked. This tutorial uses the OE schema included in the
Oracle Database.

First things First:


Let us unlock the OE schema as I recall when we installed the oracle database 11g we did not
unlock the schema. Follow these steps to unlock the schema.
Connect to the Oracle database first by:
Opening an empty command prompt window and type the following information:

 Sqlplus system/Admin123@orcl

This logs you in to oracle database 11g.

Then type the SQL Commands shown below:

 SQL > ALTER USER OE ACCOUNT UNLOCK;


 Results: User Altered
 Then type the following Command to give OE the Admin123 password.
 SQL> ALTER USER OE IDENTIFIED BY Admin123;

Logging in to Oracle BI Publisher and Navigating Through the Home Page

4
1. a. Enter the URL for BI Publisher in the browser window in the following format:
The examples covered in this tutorial use http:/localhost:7001/xmlpserver/

This opens the Oracle BI Publisher Enterprise login page.

b. Enter your credentials. Click Sign In. The Oracle BI Publisher Home page is
displayed.
2. The Oracle BI Publisher Home page provides a task-based entry into Oracle BI
Publisher's functionalities (greatly enhanced in the 11g release to enable the users
to get started quickly with BI Publisher).

It is divided into various sections enabling you to quickly begin a specific task, locate
an object, or access help documentation.

5
You can observe:

 A global header containing links and options that enable you to quickly begin a task
or locate a specific object within BI Publisher. It is always displayed when you are
working in BI Publisher. While you are viewing a report or working within one of the
task editors, you can use the global header to quickly begin a new task, search the
catalog, access product documentation, or view a different object. On the global
header, you can see the links to the Catalog, drop-down lists New, Open,
Administration, Help, and Sign In details.
 A Create section on the left that has options to help you create reports, data
models, and other objects
 A Browse/Manage section on the left that helps you to browse and manage the
catalog, jobs, and job history
 A Get Started section on the left that helps you to get started with BI Publisher,
with links to various BI Publisher tools, Online Help, and Oracle Technology
Network
 A Recent section on the right, personalized to each user so that the users can
open/view the reports that have been accessed recently (when you log in initially,
you may not see any objects listed in the Recent section). This section contains
the reports and other objects that you have recently viewed, created, or updated.
You can take actions on these objects directly from the Recent region. You can
open, edit, schedule, and view jobs or job history for a report.
6
 A Favorites section on the right enabling you to create your own list of objects for
quick access. From the Favorites region, you can Schedule, Configure, Remove,
and See Job History or Edit the objects that are selected. This is a new feature in
the current release.

Browsing the Catalog and Viewing Reports

The Browse/Manage section provides quick access to the catalog, where you can browse and
manage reports and other catalog objects.

It also has links to the Report Jobs and the Report Jobs History pages, where you can view
and manage scheduled, running, and completed report jobs.

1. The Catalog page is displayed as a tree structure on the left side of the page
with the details on the right. The catalog stores the BI Publisher objects, such
as reports, data models, and style templates.

The catalog page has a tool bar with various task icons such as New,
Upload, Copy, Cut, Paste, and other options that can be used when
creating or managing the catalog objects such as data models and reports.

7
2. Use the Folders pane of the Catalog page to display and navigate the
content.

To open the report Salary Report - No Parameters, select the report under
the Shared Folders/Sample Lite/Published Reporting/Reports folder, and
then click Open.

This will open the selected report in the Report Viewer as shown below.

8
Managing Favorites

The Favorites region enables you to manage your own list of objects for quick access.
From the Favorites region, you can Schedule, Configure, Remove, and See Job History or
Edit the objects that you have placed there.
9
1 There are several ways to add objects to the Favorites region:
.
Use the More menu in the catalog to add the report or objects to the Favorites
section.

a. Locate the report or the object in the catalog, click the More link, and then,
click Add To Favorites in the More Menu.

b. A confirmation message is displayed.

10
c. The report is added to the Favorites section now.

 You can also add a report to the Favorites section from the Report Viewer. Use
the Actions menu, and then click Add to My Favorite.
 You can also use the Manage link in the Favorites section of the Home page for
adding and managing the favorites.

Creating a New Folder

In this topic, you will learn how to create a new folder in the catalog. You will use this folder to
store/save all the objects that you create in this tutorial.

To create a new folder called Learn, do the following:

1. Click Catalog from the global header.

11
This will display the Catalog page.
2. Navigate to My Folders folder.

3 Click Folder from the New drop-down list.


.

Create dialog box is displayed.


4 In the Create dialog box, provide a folder name - Learn, and provide the
. description if necessary. Then, click Create.

12
The created folder is displayed in the catalog now. You will use this folder to
save the files, reports, and other objects that you create for the tutorial
practices.

Uploading a Resource to the Catalog

In this topic, you will learn how to upload a predefined object or a resource to the catalog.
This example will show how to upload a predefined data model to the catalog.

Follow the steps given below to upload the data model from your local machine to
the Learn folder.

Recollect that you have downloaded and unzipped the Salary Report Datamodel.zip folder to
your local machine.

Now, you will upload the Salary Report Datamodel.xdmz file into the Learn folder in the
catalog. Follow the steps given below:

13
1. On the Catalog page, navigate to the Learn folder, and then click Upload
Resource icon.

2. In the File Upload dialog box, browse and select the Salary Report
Datamodel.xdmz file from your local machine.

3. Click Upload after selecting the relevant resource.

14
.

The uploaded resource Salary Report Datamodel is available under


the Learn folder now.

This concludes the topic of uploading a predefined data model to the catalog
folder.

This feature is useful if you have to use any predefined object such as data model,
template, or report.

Setting My Account Preferences


1. To set and view the account preferences for your user credentials, use the My
Account option for your login. In this example the user name is weblogic.

15
Click My Account under the Signed In As user account to:

 Set general preferences


 Change your password
 View assigned roles

2. By default, the General tab is selected.

A locale is a language and territory combination. BI Publisher uses the Report


Locale selection to determine translation and currency, date formatting that are to
be applied on a report. In this example, the locale is set as English (United
States).

Note: If a particular report does not have a translation for the selected locale, BI
Publisher applies a locale fallback logic to select the most appropriate layout
available. BI Publisher applies localized number, date, and currency formatting
independently of the layout translation.

The UI language is the language in which the user interface displays. The
language that you selected at login is selected as the default. Select from the

16
languages that are available for your installation. In this example, it is set as
English (United States).

Reports display the time according to the time zone preference selected here. You
can override this setting when creating a scheduled report job, which is discussed
in the later topic. In this example, the Time zone is set to [GMT+00:00]
Casablanca.

Note: The time displayed on the user interface and reflected in report processing
times is governed by the BI Publisher server time zone.

When BI Publisher is running in an integrated mode (installed with OBI EE), the
Report Local, UI Language, and Time Zone drop-downs are grayed out. If you
need to change these preferences for the BI Publisher running in the integrated
mode, you should log in from the BI Analytics page.
3. Click the Password tab to reset the password.
Note: If your account password settings are inherited from another application
such as Oracle BIEE, then you cannot update your password here.

4. Click the My Groups tab to view a list of the application roles to which you are
assigned. You cannot modify this list. Click OK to close the My Account window.

17
Configuring the Data Sources

Through JDBC connections Oracle BI Publisher supports various types of Data Sources such
as Oracle Database. Before you create a data model based on these data sources, you need
to configure a connection to these data sources. In this topic, you will learn how to configure a
JDBC connection to Oracle Database sample schema. (OE Schema)

1. To define a JDBC connection, click the Administration link on the global header.

In the Administration page, click the JDBC Connection link found under the Data
Sources section.

18
2. This displays the Data Sources page. Observe the available Data Source list.
Oracle BI EE is configured out of the box, if Oracle BI Publisher is not a stand-
alone install, but part of the OBI EE install.

On the JDBC tab, click Add Data Source to create a JDBC connection to connect
to Oracle Database.

3. On the Add Data Source page that is displayed, enter the details as given
below:

 Data Source Name – Demo


 Driver Type –Oracle 11g
 Database Driver Class – oracle.jdbc.OracleDriver

19
 Connection String – Provide the database connection details.
For example, jdbc:oracle:thin:@localhost:1521:orcl
 Enter the username and password as OE.

Do not click Apply or Cancel after defining the above details. Click Test
Connection.
4. If the connection to the database is established, a confirmation message is
displayed indicating the success.

Then, click Apply.

You can see the newly defined connection, ORCL, in the list.

20
5. BI Publisher ships with a repository of various sample files and reports. You can
view these file data sources by clicking the File tab on the BI
Publisher Administration page. The screenshot shows a predefined File data
source with the name demofiles.

Creating a Data Model


Overview

A Data Model defines data that is used by a report. Creating a new data model or selecting
an existing/predefined data model is the first step in creating a BI Publisher report. A
Data Model may contain multiple data sets and it defines how data fields are structured in
relation to each other. It may also contain parameters with lists of values, bursting definitions
and other structures or properties that determine how data is provided to a report. Oracle BI
Publisher has a Data Model Editor, a graphical user interface for building data models
within the BI Publisher interface.

In this topic, you will learn how to create a Data Model based on SQL query using the JDBC
connection that you have defined in the previous topic. Also, you will learn how to add
21
parameters to the data model. You will use this data model for the new report that you are
going to create in the next topic.

Creating a Data Model


1. From the global header, click New and then select Data Model. You can also use the
Create section and Data Model link.

The Data Model Editor window is opened.


2. In Data Model Editor, observe the Data Model Properties section that is displayed
on the right.

Select a Default Data Source (that points to the database that you have been earlier
connected to). In this example, you will use Demo. Optionally, you can add a
description to the data model.

22
Note: Ensure that in the XML Output Options, the Include Parameter Tags is
checked, and the Include Empty Tags for Null Elements and Include Group List
Tag check boxes are not checked.
3. In this example, you will create a data set by using a SQL query for the report.

a. Click Data Sets on the Left side pane. This will display the Data Set Editor
section.

23
b. In the Data Set Editor section under the Diagram tab, click New Data Set
Menu and select SQL Query as the type of data set.

4. Create Data Set -SQL dialog box is displayed.

a. Enter an appropriate name for the data set (in this example, it is employees).

24
b. Accept the default data set option (as you have already defined it in the Data
Model), and click Query Builder to create a query.
5. The Query Builder window displays the OE schema objects on the left side.

Click DEPARTMENTS and EMPLOYEES tables to add them to the Model canvas
on the right.

25
6. The selected tables are displayed in the Model section. Now, define a join between
these two tables as follows:

a. Click the box beside DEPARTMENT_ID column in the DEPARTMENTS table.

b. Similarly, click the box beside DEPARTMENT_ID column in


the EMPLOYEES table. (These boxes, when marked for joins turn light gray.) Also
note that a fine line joining the tables appears in the Model canvas.

c. Select the following columns from the tables (by selecting the check boxes beside
the column names):

 Select DEPARTMENT_NAME from the DEPARTMENTS table.


 Select FIRST_NAME, LAST_NAME, HIRE_DATE, and SALARY columns from the EMPLOYEES table.

26
7. Click the Conditions link. Change the column names and remove "_" to have more
appropriate aliases. Change the aliases for the columns as below:

 DEPARTMENT_NAME to DepartmentName
 FIRST_NAME to FirstName
 LAST_NAME to LastName
 HIRE_DATE to HireDate
 SALARY to Salary

Note: The aliases and display names can be changed in the Data Model page,
either in the Diagram or in the Structure.

27
a. Enter "IN (:Dept)" in the Condition field for the department name column, as
shown in the screen below. This will define a Dept parameter on the department
name column.

Note: The IN condition is being used here for the parameter to accept All or
Multiple values for the department name column. You will edit this parameter later
to add list of values.

b. Click Results to see how the query results appear in Query Builder.
This will prompt you to enter a department name for the parameter, enter Sales and
click OK.

Results are displayed.


View results. Click Save to save the query.

28
8. a. This takes you back to the Create Data Set -SQL dialog box. Observe that the
query that you created is reflected in the SQL Query area. Click OK to add this data
set to your data model.

b. A confirmation message asks whether you want to create a bind variable.


Click OK to create the parameter.

29
c. An informative alert confirms parameter listing. Click OK.

This newly created data set is displayed under the Data Sets node in the left side
pane of the Data Model Editor. Also, the Data Set diagram is displayed in the Data
Set Editor pane. Observe that the Dept parameter is also listed under the
Parameters node.

9. You will now add List of Values and add/edit parameters for this data set.

In the Data Model pane, click List of Values node. In the List of Values pane, click
the + sign to create new List of Values. (LOV)

Select the following Options:

 Enter DepName as the Name of the LOV.

30
 Select SQL Query as the Type from the drop-down list.
 Ensure that Demo is selected as the Data Source.

Click Query Builder to define the query that returns department names for the LOV

10 In the Query Builder page, select DEPARTMENT_NAME from


. the DEPARTMENTS table. Click Save.

The query for the LOV should look like this:

31
11. a. Add another LOV (list of values) EmpName, following similar steps.
You will use the Employees table from the data, in the query builder.

b. After creating the LOV, reorder the list by using the Reorder buttons.
12. Now, edit the existing parameter, and add another parameter to use the list of
values that you have created.

In the Data Model pane, click Dept under the Parameters node. In the Parameters
pane, edit the properties by providing the following information:

Leave the Name as Dept and the Data Type as String.

Provide Default Value as *, and select Menu as the Parameter Type.

32
13 Ensure that DepName LOV is selected as the List of Values for the parameter.
.

Ensure that Multiple Selection, Can select all, and All Values Passed options are
selected.
(These options allow you to select all or multiple values for the department.)

Also, change the Display Label as appropriate, such as Department Name.

33
14. Add another parameter Emp. Use the Add icon to create a new parameter.

Follow the previous steps to define the parameter properties.

You will need to use the EmpName LOV created previously for this parameter.

34
Note that the newly added parameter always displayed first. Use the Reorder
buttons to list the parameters as shown in the data model pane.
15. Click the Save Icon to save the Data Model.

16 Save the Data Model as Salary Report Parameters under the Learn folder.
.

35
17 Click the XML icon in the Data Model Editor window to run the data as XML
. output.

18 In the XML Output window, observe that the Department and the Employee
. Parameters are available with the menu options. Click Run.

The XML output is displayed.

36
19 To save this as sample data, click the Open Menu drop-down list icon, and
. select Save As Sample Data.

37
You can see that the sample.xml is listed in the Sample Data section of the Data
Model (as shown below):

Note: It is very important to save sample data for a data model. Otherwise, when
creating Layouts, the previews do not appear correctly.

This concludes the topic of creating a new Data Model with Parameters and List of
Values. You will use this data model in the next topic to create a new report.

38
Creating Reports
Overview
Creating a New Report
Overview
A BI Publisher report is made of data model, layout, properties, and translation
(optional). Creating a New Report involves selecting the source of the data for
the report, selecting the data columns to be displayed in the report, and then
adding a meaningful layout for this data, defining the properties for the report
parameters, and scheduling the report.

A Data Model defines data that is used by a report. Selecting a data model is the
first step in creating a new report. You can select the data model with three
options. They are:

 Select an existing data model from the catalog. Locate the data model by
navigating through the catalog or by using the Search option.
 You can also upload a Microsoft Excel file (file type.xls). If the uploaded
spreadsheet contains multiple sheets, select the sheet to use as the data
source. You can include data from one sheet only.
 You create a new data model. This option opens the data model editor for
you to create a new data model.

 Next step is to design a layout for the report data. The layout defines how the
data is presented in the report. A layout consists of a template file and a set of
properties for rendering the template file. BI Publisher supports templates
created from various sources including Microsoft Word, Adobe Acrobat,
Microsoft Excel, Adobe Flash, and BI Publisher's own layout editor. A report
can include multiple layouts.

 Next, configure properties for the report. The report properties enable you to
control many aspects of the report generation, formatting, and display.

 Optionally, add translations for the report. BI Publisher's translation support


enables you to include translations for individual layouts or for all translatable
strings in the layout, data model, and the report metadata.

 Save the Report to view it in Report Viewer. After the report is generated you
can schedule it for various destinations.

39
Creating a New Report

You will create a New Report with the existing Data Model Salary Report Parameters, and
choose to create the report by using the Report Editor Option.
In the previous topic, you have created and saved this data model Salary Report Parameters in
the Learn folder.

You will be creating a new layout using the Layout Editor, and use it to view the reports. You
will also edit parameters and view them in the Report Viewer.

1. Click New>>Report in the global header.

You will be asked to select the data source for the new report. Select the Use
Existing Data Model option.

You will use the Salary Report Parameters data model that you have created
previously.
2. Select the previously created data model Salary Report Parameters from
the Learn folder. Click Next.

40
3. Select the option to Use Report Editor, and then, click Finish. This will lead you to
saving the report before proceeding further.

Selecting the Guide Me option guides you through selecting specific columns from
your data source for this report and viewing a simple tabular layout. By using this
wizard, you can quickly view the data, create a simple tabular report, and be
guided to the layout editor.
41
4. Save the Report as Salary Report with Parameters under the Learn folder.

5. The Report Editor window is displayed with the saved report, where you can edit
the layout, parameters, and other properties, and also a link to view the report.

BI Publisher Layout Templates are created by using the BI Publisher Layout


Editor – a design tool that provides a WYSIWIG, drag and drop interface for
creating pixel perfect reports in PDF, RTF, Excel, Power Point, and HTML.
It also provides dynamic HTML output that supports lightweight interaction through
a browser.

BI Publisher layouts that are created online are best suited for reports of simple to
medium complexity that do not require custom coding. Because the dynamic
HTML view is only available for BI Publisher layouts, these layouts must be used
when there is a requirement to enable a Report Consumer to interact with the
report.

To use the online layout editor, your account must be granted a role that
includes the appropriate permissions for accessing report layout tools.

 For optimum viewing, set your display resolution to 1024 x 768 or higher.
 The layout editor does not support name spaces in the XML data.

42
Select a boilerplate or shared template to create a new layout for this report.
Select Chart and Table under the Shared Templates.

Note: Boilerplates or shared templates make creating reports easy and efficient.
You can use the standard shared templates or can create your own predefined
templates based on your work requirements.
The report is opened with an untitled layout in the Layout Editor. Observe the
various sections, Data Source, Components, and Properties, that enable you
to create a pixel perfect layout.

The Data Source displays the data available. Because this is a predefined layout
with a chart and a table structure in place, you will see the grid sections to guide

43
you to add text items, charts, and data tables. You will start adding the data from
the data source to make this a meaningful report.

6. Change the text items in the layout to suit the Report, Chart, and Table that you
are going to create. Double-click the default text item to continue with the same
format. You can format the text according to your requirement with the Text
properties displayed on top of the editor. In this example, the selected Salary by
Departments section title is left aligned.

44
7. Select the default chart object in the layout grid, and choose
appropriate type and style for the chart. This example has used Bar
Chart and Earth Style. Cancel the 3D effect and keep the chart simple.

45
8. Drag and drop the Salary and DepartmentName elements to the chart as shown
below:

46
Change the aggregation property of Salary to Average.

47
A Bar chart is generated for the selected data.

9. Now you will add the data table for Salary by Departments. You will use
"Repeating Sections" and "Data table" elements.

a. Under the Salary by Departments grid cell, click Insert>Repeating Section.

48
b. In the Insert a Repeating Section editor window, select Element, Row,
and DepartmentName. Click OK.

The Repeating section is inserted.

49
10. Select the repeating section area and click Insert>Data Table.

11. Drag the data elements from the Data Source to the Layout pane. Observe that
DepartmentName is outside the data table.

50
12. Adjust the column width by editing the column property as shown in the image.
You will have to select the column to be edited, and then change the properties.

51
You can also edit the columns by adjusting the column directly in the table.
13. a. Format the Hire Date column by the Data Formatting option. Select an
appropriate date format.

52
b. Format the Salary column by using the Data Formatting option. Select
the Currency format.

53
c. Format the total row for the salary column with currency formatting. You will
have to select this cell separately for the formatting.

The formatted table is displayed as shown below.

54
d. Check for any empty data elements that are not defined in the template. In this
newly created layout there is an empty data table. Because you have inserted a
new data table under the repeating section, the default data table element that
was part of the chosen boilerplate template remains empty.

Select and delete it from the layout. Empty data elements will result in errors in
the report views.
14. Click the Save icon to save the layout.

Save the layout with the name New Formatted.

55
15. Observe that the saved Layout is displayed in the Layout Editor with the
name New Formatted.

Click the Viewer menu and select the Interactive view to view the report in a
browser window.

56
16. The Report is previewed in Interactive Viewer in a browser window. Close the
browser window to get back to the Layout Editor.

57
17. Click Save and then click Return to close the Layout Editor.

You can create Report templates online as described in this topic.

58
You can also create various other templates such as RTF, EXCEL, PDF, Flash,
and eText.

Additional information:

 RTF templates – by using Template Builder for MS Word ( MS Word add in)
 Excel templates – by using Excel Analyzer ( MS Excel Add in)
 PDF templates – by using any application that supports PDF conversion, or by
scanning a paper document to be used as a template, or, by downloading a PDF
document from a third-party source.
 Flash Templates – by using the FlexBuilder IDE from Adobe
 eText Templates – by using either EFT or EDI types based on commands.

18. The Report Editor window displays the newly created New Formatted Layout.

Click the Save icon, and then click View Report.


19. The report is displayed in the Report Viewer window.

59
Observe that the parameters are displayed horizontally, and with the display type
as menus. You will learn to change this display in the next few steps. This is a
recently added enhancement.

Click Edit Report from the actions menu.

60
20. This will bring you back to the Report Editor. Parameters are defined in the data
model. The report editor enables you to configure the parameter settings. Click
the Parameters link in the report editor window. The Parameters dialog is
displayed as shown below.

Observe that the parameter display is set to Horizontal Region, label location
is Place label on side, and the Show Apply Button is set to Default. Also, the type of
the option for parameters are Menu.
21. Now, change the display options as shown below and click OK.

61
Save the report and view it in the Report Viewer.
22. The Report is displayed in the Report Viewer window with the newly set display
options for the parameters.

62
You can select the various departments, and employee name combinations to
view the respective report data. This adds greater flexibility and interactivity to the
BI Publisher reports.

You can also change the display for the Show Apply Button option to false in the
parameter settings for the same report, and observe the change in the display.
Use the Report Editor to edit the parameters as explained previously.

63
Now, Return to the Report Editor from the Actions menu, and change the
parameter display back to menu. You will use this display and the layout in the
next topic of Scheduling Reports.

Creating Report Jobs / Scheduling Reports


Overview
 Creating a Report Job

 Managing Report Jobs

Overview

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 will learn to schedule a report job, and view and manage the scheduled jobs
and job history.
You will also be able to edit a scheduled job and run it or resubmit and run again. This is a new
enhancement in the current release.

Note: The current version has an enhancement to execute the scheduled report job based on
conditional triggers. You will need to include a Schedule Trigger in the Data Model of the
report. When the report job is scheduled to run, the trigger is executed. Schedule triggers are
of SQL Query type. When a report job is scheduled to run, the schedule trigger executes the
SQL statement defined for the trigger. If the data is returned, then the report job is submitted.
If no data is returned from the SQL query, the report job is skipped. This feature is not covered
in this tutorial.

Creating a Report Job


1. You can schedule a Report Job in any of the following ways:

 From the Home page: From the Create region select Report Job
 From the global header: Click New> Report Job
 From the Catalog: Navigate to the report you want to schedule, then select
the Schedule link
 From the Report Viewer: Click Actions and then click Schedule

64
2. In this example, you will schedule the previously created Salary Report with
Parameters report.

Select the report from the catalog and click Schedule.

65
The Schedule Report Job window is displayed. It contains four tabs to define the
options for your report job: General, Output, Schedule, and Notification.
3. The Schedule Report Job window displays the General tab by default. You can
either leave the default selected parameters as it is, or change it to suit your
requirement. In this example, you can see the selected report for scheduling in the
general tab, and default parameters.

4. Click the Output tab.

Select the options as shown below.

 Select the Make Output Public, and Save Data for Republishing check boxes.
 Output name is Output1 by default. This refers to the delivery destinations that you
have defined.
 Leave the default selected layout as is.

The format selected is HTML. The various other formats supported are PDF, RTF,
Excel, and Power Point 2007.

66
Note: Email, a typical destination type, is not configured.
5. a. Click Schedule tab.

b. Select the options as given below:

 Frequency is set to Daily.


 Leave the Start and End Dates as default selection. You can change this based on
your requirement.

Note: Do not run the report immediately. Maintain a delay with the submission and
the actual schedule time.

67
:

You can use the Notification tab to send notification to the recipient via Email. This
is an optional step.

c. Click Submit.
6. Provide an appropriate name to the Report Job in the Submit dialog box, and then
click OK. In this example, the Report Job name is Sal Report Job 1.

68
You will get an alert message that the Report Job is successfully submitted.
Click OK.

This concludes the topic of Creating a Report Job.

Managing Report Jobs


1. The Manage Report Jobs page displays information about future scheduled
and recurring report jobs and enables you to take actions on these jobs. You
can edit the running or future scheduled report jobs here. For this, you will need
a running or future scheduled report job. You will now edit the previously
scheduled job, which was set to run daily.

Click Open>Report Jobs from the global header.

2 The Manage Report Jobs page is displayed with the scheduled reports.
.

69
You can delete, pause, resume, or edit report jobs from this page using the
icons as shown in the image.

Select and click the Report Job Name. In this example, click Sal Report Job 1 to
view the Report Job details.
3. You can also edit the report job from the Report Jobs Detail page.

Click the Edit icon next to the job name as shown below:

70
This will take you to the Schedule Report Job Page.
4 a. Edit the Report Job to change the parameters displayed. Select Shipping,
. Sales, and Finance departments from the Department Name drop-down list.
Keep the Employee Name as is with the All option.

71
b. Under the Output tab, change the format to PDF.

72
c. Click Submit. This will submit the same job with the previously set frequency.
Keep the name of the job same as before and click OK.

d. After you get the confirmation that the job is submitted successfully,
click Return to return to the Manage Report Jobs page.
5. Observe the changes in the Manage Report Jobs window. The edited and
submitted job is listed under the previously chosen Job name Sal Report Job1.
Click the Job Name to view the details as explained at the beginning of this

73
topic. In the displayed report Sal Report Job 1, observe that the values for the
departments are reflected as defined by you during the editing. The output
format change is reflected too. Scheduling frequency is left unchanged.

You will edit this report job again to change the frequency of the schedule and
submit the job as a new one and see the scheduled report output.

Click the Edit icon to edit the report job. You will be taken to the Report
Job/Scheduling page.
6. a. Now, change Schedule Frequency for the same job to Once, and select
the Run Now option. Keep all other criteria unchanged from the previous
schedule.

74
b. Click Submit As New. Name this Report Job as Sal Report Job 2 and click OK.

c. Click OK in the submission confirmation message.


7. Now, click Open>Report Job History from the global header. You will need to
use the Job History to view the Jobs that are executed already.

The Report Job History page displays information about running and completed
report jobs.

75
Observe that the newly scheduled report is successfully submitted. Click the
report job - Sal Report Job 2 to view the details.
8. The Report Job History for Sal Report Job 2 is displayed as shown below. The
parameters display and output options are as set by you.

Click Output 1 link in the list to see how the scheduled report is displayed.

76
The report is displayed in the browser window in the PDF format. Use the
browser back button to return to the BI Publisher.

77
This concludes the topic Managing Report Jobs.

78
SUMMARY

This tutorial covered the regular navigation features and operations for Oracle BI Publisher
11.1.1.6.0 and later versions.

In this course, you have learned how to:

 Launch and Log in to the BI Publisher


 Set Preferences
 Define Data Sources
 Create a Data Model
 Create a Report using Report Editor
 Use Layout Editor
 Schedule Reports (Create Report Jobs)
 View and Manage Report Jobs

25

79
Connecting to an Email Server

To deliver your reports, connect BI Publisher to your email server. Once configured

you can use BI Publisher scheduled jobs to send reports to your colleagues.

To connect to an email server:

1. Click Administration.

2. On the Administration page, under Delivery, click Email.

3. This displays the Delivery page with the Email tab selected. Click Add Server.

4. On the Add Server page, enter the details for your email server as follows:

_ Enter a unique Server Name.

_ Enter the email server Host (for example: mail.example.com) and Port.

_ (Optional) Select the Secure Connection type.

_ (Optional) Enter the server Username and Password.

5. Click Apply.

Email is now available as a Destination Type for BI Publisher scheduled jobs.

80
Inserting a Gauge Chart or a Pivot Table
A gauge chart is a useful way to illustrate progress or goals

To insert a gauge chart in the layout:

1. From the Insert menu, select and drag the Gauge component to the layout. This inserts an empty gauge chart,

Description of "Figure 3-66 An Empty Gauge Chart"

2. Select and drag the data fields from the Data Source pane to the Label, Value, and Series areas of the chart. The chart
immediately updates with the preview data.

Figure 3-67 shows REGION being dragged to the Label area and DOLLARS being dragged to the Value area:

Figure 3-67 Dragging and Dropping REGION and DOLLARS to a Chart


81
Description of "Figure 3-67 Dragging and Dropping REGION and DOLLARS to a Chart"

Note the following:

 A separate gauge is created for each occurrence of the Label (that is, each REGION). One set of properties
applies to each occurrence. To apply different properties to each gauge, see Creating Filtered Gauges.
 By default, the Value field is a sum. You can change the expression applied to the value field. See Section 3.9.2,
"Changing the Formula Applied to a Chart Measure Field."
 You can apply a sort to the other gauge chart fields.

3.10.2 Setting the Properties for a Gauge Chart


Use the Properties Pane to set detailed options for a gauge chart.

82
3.10.3 Applying and Managing Filters
See Section 3.8.3.2, "About Filters" for information on how to apply and manage filters.

3.11 About Pivot Tables


The pivot table provides views of multidimensional data in tabular form. It supports multiple measures and dimensions and
subtotals at all levels. Figure 3-68 shows a pivot table.

Figure 3-68 A Pivot Table

Description of "Figure 3-68 A Pivot Table"

3.11.1 Inserting a Pivot Table


To insert a pivot table:

1. From the Insert tab, select and drag the Pivot Table component to the layout. Figure 3-69 shows the empty pivot table
structure.

Figure 3-69 The Empty Pivot Table Structure

83
Description of "Figure 3-69 The Empty Pivot Table Structure"

2. Drag and drop data fields from the Data Source pane to the row, column, and data positions.

Drag multiple fields to the pivot table and place them precisely to structure the pivot table, as shown in Figure 3-70.

Figure 3-70 Dragging and Dropping Data Fields to a Pivot Table

84
Description of "Figure 3-70 Dragging and Dropping Data Fields to a Pivot Table"

3. By default the pivot table is inserted with no data formatting applied. To apply a format to the data, click the first
column of data to enable the Pivot Table Data toolbar. On the Data Formatting group, select the appropriate format as
shown in Figure 3-71.

Figure 3-71 Selecting a Format

85
Description of "Figure 3-71 Selecting a Format"

4. Optionally resize the pivot table by clicking and dragging the handler in the lower right corner of the pivot table, as
shown in Figure 3-72.

Figure 3-72 Resizing a Pivot Table

86
Setting Predefined or Custom Formulas
The Formula group of commands is available from the following tabs:

 Column tab
 Total Cell tab
 Chart Measure Field tab
 Pivot Table Data tab

Formula Description
No Formula Removes any mathematical formula from a numeric column.

Blank Text Removes all data and inserts blank text.

Count Returns the count of the number of occurrences of the element in the
current group.

Count Returns a count of the distinct values of an element in the current


Distinct group.

Summation Sums the values of the element in the current group.

Average Displays the average of the values in the current group.

Maximum Displays the highest value of all occurrences in the current group.

Minimum Displays the lowest value of all occurrences in the current group.

Note that not all options are applicable to each component type.

For non-numeric data, only the following formula options are supported:

 Blank Text
 Count
 Count Distinct
87
Applying a Custom Formula: Examples
3.15.3 Applying a Custom Formula: Examples
Example 1: Subtraction

Figure 3-97 shows data for Revenue and Cost for each Office:

Figure 3-97 A Table Showing Revenue and Cost Data for Each Office

Description of "Figure 3-97 A Table Showing Revenue and Cost Data for Each Office"

Using a custom formula, you can add a column to this table to calculate Profit (Revenue - Cost).

1. Add another numeric data column to the table. For example, drag another instance of Revenue to the table, as shown
in Figure 3-98.

Figure 3-98 A Table With Two Instances of Revenue

88
Description of "Figure 3-98 A Table With Two Instances of Revenue"

2. With the table column selected, click Define Custom Formula.


3. In the Function dialog select Subtraction from the list, as shown in Figure 3-99. Because the source data for the
column is Revenue, by default the Minuend and the Subtrahend both show the Revenue element.

Figure 3-99 The Subtraction Function

Description of "Figure 3-99 The Subtraction Function"

89
4. Select Subtrahend, then in the Parameter region, select Field and choose the Cost element, as shown in Figure 3-100.

Figure 3-100 Subtraction Function with the Cost Element Selected

Description of "Figure 3-100 Subtraction Function with the Cost Element Selected"

The dialog is updated to show that the formula is now Revenue minus Cost, as shown in Figure 3-101.

Figure 3-101 Updated Subtraction Function Showing a Formula of Revenue Minus Cost

90
Description of "Figure 3-101 Updated Subtraction Function Showing a Formula of Revenue Minus Cost"

5. Click OK to close the dialog.


6. The table column displays the custom formula. Edit the table column header title, and now the table has a Profit
column, as shown in Figure 3-102.

Figure 3-102 A Table Showing the Custom Formula Column Titled Profit

91
Description of "Figure 3-102 A Table Showing the Custom Formula Column Titled Profit"

Example 2: Nested Function

This example uses a nested function to create a column that shows Revenue less taxes.

1. Add another numeric data column to the table. For example, drag another instance of Revenue to the table, as shown
in Figure 3-103.

Figure 3-103 A Table With Two Instances of Revenue

Description of "Figure 3-103 A Table With Two Instances of Revenue"

2. With the table column selected, click Define Custom Formula.


3. In the Function dialog select Subtraction from the list. Because the source data for the column is Revenue, by default
the Minuend and the Subtrahend both show the Revenue element, as shown in Figure 3-104.

92
Figure 3-104 Subtraction Function with Minuend and Subtrahend Showing the Revenue Element

Description of "Figure 3-104 Subtraction Function with Minuend and Subtrahend Showing the Revenue Element"

4. Select Subtrahend, then in the Parameter region, select Nested Function and click Edit, as shown in Figure 3-105.

Figure 3-105 Subtraction Function with the Nested Function Selected

93
Description of "Figure 3-105 Subtraction Function with the Nested Function Selected"

A second Function dialog is displayed to enable you to define the nested function. In this case the nested function is
Revenue times a constant value (tax rate of .23), as shown in Figure 3-106.

Figure 3-106 The Function Dialog Showing the Nested Function Revenue Times a Constant Value

94
Description of "Figure 3-106 The Function Dialog Showing the Nested Function Revenue Times a Constant Value"

5. Click OK to close the dialog. The primary Function dialog now shows the nested function as the source of the
subtrahend, as shown in Figure 3-107.

Figure 3-107 The Function Dialog Showing a Nested Function as the Source of the Subtrahend

95
Description of "Figure 3-107 The Function Dialog Showing a Nested Function as the Source of the Subtrahend"

6. Click OK to close the Function dialog. The table column displays the custom formula. Edit the table column header
label, and now the table displays the custom function, as shown in Figure 3-108.

Figure 3-108 A Table Showing the Custom Function Revenue less tax (23%)

Description of "Figure 3-108 A Table Showing the Custom Function Revenue less tax (23%)"

96
3.16 Saving a Layout
To save the layout to the report definition:

1. Click the Save or Save As toolbar button


2. The Save Layout dialog displays the list of layouts defined for the report definition as shown in the following figure:

Figure 3-109 The Save Layout Dialog

Description of "Figure 3-109 The Save Layout Dialog"

3. Enter a unique name for this layout.


4. Select a Locale.

Note:
When you have saved the layout, the Locale cannot be updated.

97
Creating RTF Templates by Using BI Publisher 11g Template Builder for Word
Software Requirements

The following is a list of software requirements:

 Microsoft Word (2003 or 2007)

 Java SE Development Kit (JDK) 5 or later (This also includes Java Runtime Environment [JRE]. JRE 1.6 or later is required.)
 MS .NET Framework 3.5 with SP1 or later.
 Oracle BI EE 11g installed on a machine that Template Builder can connect to by using HTTP.
 Oracle BI EE 11g should be able to connect to a supported data source.

Installing Template Builder and Exploring the Template Builder User Interface

In this topic, you will see how to download the Template Builder add-in, and install it. Then you will explore the the Template Builder
user interface.

Installing Template Builder


Exploring the Template Builder User Interface
Installing Template Builder

Template Builder can be downloaded from the Get Started region of the Oracle BI Publisher Home page or Oracle BIEE Home page. In
this topic, you will download the Template Builder add-in and install it.

Perform the following steps to download and install Template Builder:

1 . Log in to Oracle BI Publisher.

98
2 . In the Get Started section of the Home page, click the Download BI Publisher Tools menu,
and select Template Builder for Word.

99
3 . The Opening BIPublisherDesktop.exe dialog box opens. Click Save File. Save the file to a
suitable location on your hard drive.

4 . Navigate to the location where you have downloaded the BIPublisherDesktop.exe file
and double-click the executable file to begin the installation.

100
5 . a. After the Install Shield wizard starts, follow the on-screen instructions to complete the
installation.

b. Click Finish.

101
6 . If Template Builder is installed correctly, you will see the BI Publisher ribbon in Word 2007:

Note: If you are using Microsoft Word 2007 you may need to modify your Add-In settings: To
do so, click the Office button, click Word Options, and then click Add-Ins.

Exploring the Template Builder User Interface

In this topic, you will review Template Builder UI components. You will open the existing Balanceletter.rtf file.

(This file is made available to you in the My Templates and Files zip file, as well as in Sample after you install the Template
Builder.)

1 . The BI Publisher ribbon has the following options:

 Online

You can log in to BI Publisher from here. After you log in, you can use the Open button to open a report from
the BI Publisher catalog.

102
 Load Data

This group of commands enables you to load a saved sample data file or sample schema to Template Builder.
You must load data to use most of the Template Builder functionality. The Sample XML button allows you to
load a sample XML file that contains all the fields that you want to insert into your template as a data source. If
you are not connected to the BI Publisher server, use this method to load your data.

 Insert

This group enables you to insert the following elements into your RTF template.

o Table Wizard: This function provides a wizard that guides you through the creation of
tables used in typical reports.
o Pivot Table: Using this you can drag and drop data elements into a pivot table.
o Chart: BI Publisher does not recognize native Microsoft Word charts. The Insert Chart
function allows you to insert a chart that is understood by Oracle BI Publisher.
o ab|Field: This function allows you to select fields from your data source and insert them into
your template
o Table/Form: Use this function to insert data fields to be organized as a simple or nested
table or as a form that is repeated with different data. You may even organize all the data
fields for the whole document before inserting them.
o Repeating Group: Use this to select or define a group of elements to be repeated for each
occurrence of an element in the data.
o Conditional Format: This enables you to define simple conditional formats to apply to table
rows or cells.
o Conditional Region: This enables you to insert a conditional statement around a region of
the template. A conditional region is an area that is surrounded by a conditional statement. If
the statement tests true, the area is displayed in the report; if the condition tests false, the area
is suppressed from the report.
o All Fields: This function inserts all fields found in the XML data into your document. It will
also insert processing instructions into your document that will repeat a section, such as a
table row when the associated XML element is repeated. When you are working on a deeply
nested hierarchy of elements, it is better to insert elements separately, instead of inserting all
fields.

103
 Preview

This enables you to preview your RTF template with sample XML data. The preview menu
offers you PDF, HTML, RTF, Power Point, Excel (MHTML format), and EXCEL2000 as
output formats. When you select any of these output formats, Template Builder will merge the
data into your template and create the output document.

 Tools

This group has the following advanced editing tools for the templates:
o Field Browser: This is for advanced users to review and edit BI Publisher commands inserted in the form
fields. It shows the commands behind each form field and allows you to edit them. Use this tool to correct
flawed RTF templates or to update multiple fields efficiently.
o Validate Template: The validation function checks the template for incorrect use of BI Publisher commands
and unsupported elements in the Word file.
o Check Accessibility : Run this tool to check for the accessibility features in the template.
o Translation:
Extract Text: This command enables you to create a standard XLIFF translation file containing the boilerplate
text from your template. XLIFF is a standard file format that is understood by many translation software
packages. Because an XLIFF is an XML file, you can translate the text in a text editor.
Preview Translation: This command enables you to preview your template as a PDF file using a specified XLIFF
translation file. This functionality enables you to test translation files.
Localize Template: This command applies a translation file to an RTF template. This means that in your
current RTF template all boilerplate text is translated. The main function of this feature is to create a
language-specific version of a template.
o Export
XSL-FO Stylesheet: This function allows you convert the RTF template into an enhanced XSL-FO stylesheet.
This function can be used to generate XSL-FO for debugging or further customization.
FO Formatted XML: This function allows you to apply the XSL-FO style sheet generated from the Word
document to the sample data and save the intermediate FO format. This function is mainly for debugging.
PDF This function converts the Word document to PDF.

 Options

This group allows you to change the following options that influence the look and feel of Template Builder:
o Display Mode
o Preview
104
o Build

You will use all these functions in the coming sections.

Building an RTF Template in Offline Mode

Rich Text Format (RTF) is a specification used by common word processing applications, such as Microsoft Word. When you save a
template in Template Builder, the file type should be RTF. You can build and upload your template via a direct connection with the BI
Publisher Server, called Online mode, or you can build and upload your template in a disconnected mode, and is called Offline mode.

Note: To work in disconnected mode, you must have a sample data file available in your local work environment. In this example, the
sample data file is Balance.XML.

1 . a. Select Start >Programs >Oracle BIP Desktop >Samples >RTF Templates.

b. Open the Balance Letter folder and load the file Balance Letter Start.rtf. This is a sample
template file.

2 . The RTF template file opens in MS Word.

105
3 . To build a report and view the report with data, you must load sample XML data. When
working in disconnected or Offline mode, you must have sample data stored locally.

a. Click Sample XML in the Load Data group.

b. Select the Balance.xml sample data file located under your local
drive(C):\Program Files\Oracle\BI Publisher\BI Publisher
Desktop\samples\RTF templates\Balance Letter. Click Open.

You will see a confirmation message that the data is loaded successfully.

4 . a. Now insert the various fields in the Balance Letter by replacing the placeholders. Select
the <INSERT ADDRESS HERE> placeholder, and click ab | Field, in the Insert group.

106
b. In the Field dialog box, select the Customer Name field and click Insert.

107
5 . The Customer_Name field appears in the Balance Letter. Click the space following the
CUSTOMER_NAME field and press Enter. This adds a line break.

6 . Repeat this process, adding Address Line1. Also, add City, State, and Zip, each of them
separated by a comma and space. The letter should look like this:

7 . a. Insert the following fields into the letter, in the appropriate placeholders:

 As_Of_Date
 Trx Currency Code

108
 C Inv Open Balance.

Note that you may have to scroll in the Field dialog box to locate these fields.

b. Close the Field Dialog box.

8 . Include the table of invoices by using the Table Wizard. The Table Wizard allows you to add
tables, forms, charts, and other objects.

a. Select the <INSERT TABLE OF INVOICE HERE> placeholder in the form letter.
Click Table Wizard in the Insert group.

109
The Table Wizard opens.

110
b. Accept the default (Table) and click Next.
9 . The Table Wizard intuitively selects the correct data set for you. In this example, it
is /ARXCOBLX/G_CUSTOMER/G_CURRENCY/G_INVOICES. Accept the default and
click Next.

111
You can change this, however, by clicking the drop-down list.
10 . a. Select the following columns:

 Trx Number
 Transaction Date
 Trans Amount
 Trans Amount (Second "Trans Amount" is Trans Amount Remaining)

Use the shuttle icons to move items to the selected column one at a time or use the double-
headed shuttle icons to move all columns at once.

Use the resequence icons to move the columns up and down.

112
b. Click Next.
11 . You can group your data. You use the Break option to insert either a page break or section
break after each occurrence of a group. In this example you will not select any options.
Click Next.

113
12 . a. Select a sort sequence and indicate the type of data that is being sorted. Select Transaction
Date, indicate that this field is a number, and sort the column in descending order.

114
b. Click Finish.
13 . The table opens in the template. Observe the codes F (for "Grouping") and E (for "Each") in the
table.

14 . Preview this template in PDF format. In the Preview group, click PDF.

115
The report is displayed with the XML file data that you loaded earlier.

15 . You can view the Word properties of any table field that you have added to your template.
Double-click TRANS_AMOUNT in the table.

The BI Publisher Properties dialog box is displayed.

116
Click the Word Properties button to edit the inserted fields.
16 . a. In the Text Form Field Options dialog box, select Number from the Type drop-down list.

117
b. Set the default number and number format. Enter $1,000.00 in the Default number text box
and select $#,##0.00 from the Number format drop-down list.

c. Click OK. The template is displayed with the applied formatting.

d. Right-justify this Trans Amount field by using MS Word Paragraph menu.


17 . You can format the other fields as per your requirement. However, because the date is a text
field in this example, you will not be able to format it.

You can also format the column names of the table to a meaningful display using the MS Word
menu. Change the column names as given below and then keep the formatting as Bold.

 Trx Number to Invoice Number


 Transaction Date to Date
 Trans Amount to Transaction Amount
 Trans Amount Remaining to Transaction Amount Remaining

118
18 . Save the template as My Balance Letter in the Learn folder on your local drive.

19 . When you preview this template, the report is displayed with the applied formatting.

119
20 . Close the preview and the template file.
21 . Log in to BI Publisher Enterprise Edition.

22 . On the Catalog page, navigate to the Balance Letter report and click Edit.
This Balance Letter report is part of the Samples files.

120
23 . The Report Editor opens. Click Add New Layout.

24 . Click Upload.

121
25 . a. Enter Balance Letter as the layout name.

b. Click Browse. Navigate to and select My Balance Letter.rtf from


the Learn folder, and click Open.

c. Select RTF Template as the type and English (United States) as the locale.

d. Click Upload.
26 . The uploaded layout is displayed in the layout editor. Click Save.

122
27 . Click View Report.

In the displayed report, click the Balance Report tab. The report based on the template that you
have designed in Template Builder is displayed.

123
This concludes the topic on creating a RTF template using Template Builder in Offline mode.

Building an RTF Template in Online Mode

This topic demonstrates how to design an RTF template while logged into BI Publisher.
You will log in to BI Publisher through Template Builder, define an RTF template, add a table with a running total, add grouping and
sorting, add a page break, add a chart, preview data in the report by using the template, upload the RTF template to BI Publisher
Enterprise Server, and view the report on BI Publisher Enterprise Server.

1 . a. Open a new blank word document.

124
b. Log in to BI Publisher by clicking Log On in the Online group.

c. Enter the Report Server URL as the BI Publisher Server installed on your machine. For
example, http://<host>:<port>/xmlpserver

d. Click Login.
2 . The Open Template dialog box opens. Select the Salary Reports – No
Parameters report. (Navigate to \Shared Folders\Sample Lite\Published
Reporting\Reports\)

125
3 . When the report opens, you will not see any data in the blank MS Word document. However,
XML data definitions are loaded from the report to facilitate the definition of a template. Notice
that the report name appears in the title bar of MS Word beside the document name.

126
4 . Now start building the template.

Insert a word table with two rows. Insert the chart in the first row, followed by the table in the
second.

5 . Now you will add a chart for this template. Position your cursor in the first row of the word
table. In the Insert group, click Chart.

6 . The Chart window opens. Select Row in the Data pane.

127
7 . a. Drag Annual Salary to Values in the Layout pane.
b. Drag Department Name to the Labels text box.

128
8 . In the Layout pane, select the following information:

Step Attribute Values


a. Type Bar Graph - Vertical
b. Style Earth
c. Aggregation Average
f. Title:Title Average Annual Salary by Department

The Chart wizard should look like this:

129
Click OK.
9 . The chart appears in the template.

130
10 . Now use the Table wizard to insert the table in your template. You did this in the previous
topic, but in Offline mode. Take your curser to the next row of the MS Word table, and then
insert the table.

a. Select Department Name,Manager, Name, Job Title, Annual Salary, and Fed
Withheld (in that order). Your selections should be listed in the right pane of the wizard page.

131
b. Click Next.
11 . In the How would you like to group your report? section, select the following options:

 Group By - Department Name


 Group Above
 Break - Section
 Then By - Manager
 Group - Left

Recall that while working on the table in the Offline mode, you did not choose options for
grouping. This example uses section breaks in the report with Department Name as the group
and has a second grouping by Managers.

132
Click Next.
12 . Sort by Annual Salary in the Which fields would you like to use to sort the data? section.
Click Finish.

13 . This table appears in the document, below the chart. Right-justify the cell
for ANNUAL_SALARY.

133
14 . Save the file as Manager Financials Report.rtf in your Learn folder.

134
15 . Select the PDF preview option from the Preview group. The PDF is displayed. Observe that
because you used the “Group above” option while inserting the table, a department name
appears above each table.

135
16 . Close the PDF.
17 . Now, upload the template to the BI Publisher Server.

Click Upload Template As in the Online group.

136
18 . Upload as new dialog box opens. Enter Manager Financials Report as the Template Name.

19 . A confirmation message is displayed. Click OK.

20 . Navigate to the Salary Report - No Parameters report in the BI Publisher


Enterprise Server and click Edit.

137
21 . The uploaded layout is displayed in the layout editor. Save and then click View Report.

138
22 . In the displayed report, click the Manager Financials Report tab. The report based on the
template you have designed in Template Builder is displayed.

139
This concludes "Building an RTF Template in Online Mode" topic.

Working with a Pivot Table in an Existing RTF Template

This topic covers adding a pivot table to an existing RTF template. You will open an existing RTF template to preview a chart, and add
a pivot table to the template. The RTF template Retail Sales.rtf is stored in the My Templates and Files zip file.

1 . Open the Retail Sales.rtf file in MS Word. The file looks like this:

140
2 . In the BI Publisher ribbon, click Sample XML in the Load Data group.

3 . Navigate to and select RetailSales.xml (located in the same folder as the Retail Sales
RTF template), and click Open. This file contains retail sales data from different industries.

141
4 . Click OK in the message dialog box. The data is loaded.
5 . Click Enter twice to enter a line break after the PIE Chart.

142
6 . Click Pivot Table in the Insert group. The Pivot Table dialog box opens.

You drag data columns from the Data pane to the blank Layout pane to build a pivot table.
7 . a. Drag Year to Column

b. Drag Month to Column

c. Drag Industry to Row

d. Drag Sales to the Please drop data here area.

143
8 . a. Select Sales in the row.

b. Select the cell to the right of Format in the Properties pane to select SUM.

c. Select #,##0 in the properties drop-down list.

144
d. Click OK.
9 . The pivot table appears in the template.

145
10 . Save the template, and then click PDF in the Preview group to view your pivot table.

146
This concludes the "Working with a Pivot Table in an Existing RTF Template" topic.

Using Template Builder Utilities: Field Browser, Validate Template, and Check Accessibility

This topic will demonstrate how to use the Field Browser, Check Accessibility, and Validate Template utilities available in Template
Builder.
You will use the Retail Sales.rtf file, which is made available to you at My Templates and Files zip file.

Using Validate Template


Using Field Browser
Using Check Accessibility

147
Using Validate Template
1 . a. Open the RTF file Retail Sales.rtf.

b. In the BI Publisher tab, in the Tools group, click Validate Template.

2 . If there are no validation errors, No Error found is returned.

148
If an error is found, the error will be displayed.

Note: You can also use Field Browser to help locate the error.

Using Field Browser

The Field Browser utility provides a fast way to review and update the BI Publisher instructions hidden in the Microsoft Word form fields.
This is particularly useful for understanding and modifying existing templates.

1 . In the BI Publisher tab, in the Tools group, click Field Browser to open the Field Browser
dialog box.

149
2 . The Field Browser dialog box shows the default text of the form field in the Text column, and
the instructions (from the help and status text of the form field) in the Code column.

150
Note:

 When you select a specific row in the dialog box, the matching form field will be selected in the Microsoft Word
document.
 If you select some part of the text before opening the Field Browser, the dialog shows only the fields in your
selection. If no text is selected, Field Browser will show all fields in the document. This screenshot shows all the
fields, because no specific form field was selected before opening Field Browser.

3 . You can update processing instructions directly from the Field Browser dialog box.

151
a. Select INDUSTRY in the Text column..

The Edit field shows the processing instructions.

b. Change all but the first of the capital letters of the word INDUSTRY to lowercase. In other
words, change INDUSTRY to Industry.

c. Select Update.

152
Observe that the code is changed as per your edit.

Note: Recall from the previous topic that you can use Field Browser to find out validation
errors in the template. Use the Find option in the Field Browser to search for the errors.

Using Check Accessibility

Template Builder provides an accessibility checker to check the template for features to enhance the accessibility of the report for
report consumers who may need assisting technologies to view the report. For more information about developing accessible reports,
see "Designing Accessible Reports" in the Oracle Fusion Middleware Report Designer's Guide for Oracle Business Intelligence
Publisher.

1 . In the BI Publisher tab, in the Tools group, click Check Accessibility.

153
2 . The tool generates a report indicating areas of your template that do not include the accessibility
features.

This template does not have accessibility compatibility for a row header of a table.

For more information about developing accessible reports, see Designing Accessible Reports"
in the Oracle Fusion Middleware Report Designer's Guide for Oracle Business Intelligence
Publisher.

154
Setting Configuration Options for Template Builder

In this topic, you will see how to set the various UI options and configuration options for Template Builder. The important settings
covered are:

 The UI Options tab allows you to change some options that influence the look and feel of Template Builder.
 The Preview Options tab allows you to specify options that influence the Preview functionality of Template Builder.
 The Build Options tab allows you to specify options that influence how Template Builder generates tables and forms.


Setting UI Options

Setting Preview Options


Setting Build Options
Setting UI Options
The tree view showing the data source can show either the correct XML tag names of the data source
or a slightly modified version that is easier to read.

Select the Element Names for Reports XML option to show the modified labels. These labels
contain no <> characters, use title case capitalization and use spaces instead of underscores.

Setting Preview Options


The Preview tab allows you to specify options that influence the Preview functionality of Template
Builder.

The various options that you can set using this dialog are:

 Style Template
 Locale
 Java Home
 Java Option

155
Style Template

If you have a BI Publisher style template available locally you can specify it here. The style
information in the style template is applied to RTF layouts at runtime to achieve a consistent look
and feel for your enterprise reports. In this example no style template is defined.

For more information, see "Creating and Implementing Style Templates" in the Oracle Fusion
Middleware Report Designer's Guide for Oracle Business Intelligence Publisher.

Locale

You can choose the language and territory used for previewing your template. While this change will
not automatically translate any files, it is important to set the correct locale for the preview to use the
correct direction of the text (left-to-right or right-to-left), and to correctly set locale-specific date,
number, and currency formats. In this example the Locale is set to English - United States
[en-US]

Java Home

The Preview (and export functionality) requires Java code. You can change the path to your JAVA
HOME directory. If this option is not specified, Template Builder assumes that the Java virtual
machine (java.exe) is accessible in the PATH specified in your environment variables of
Windows. In this example it is set as C:\Program Files\Java\jre6

156
Java Option

Specify the memory to reserve for Template Builder to process the template. The default value is -
Xmx256M. The example shows the same.
Setting Build Options
Use the Build tab to specify options that influence how Template Builder generates tables and forms.

The various Build options that you can set here are:

 For-each form field


 Form field size
 Table Header Color

For-each form field

Use this to choose how the Template Builder creates the form fields for processing instructions in the
Insert Table/Form dialog box. The Descriptive option (for example: for-each Invoice) renders a
descriptive form field for the processing instructions. This option makes the layout template easier to
understand. However, the longer fields may distract from the visual layout of the template.
The Abbreviated option (for example: F) provides a one letter abbreviation for each instruction.

Select the Hidden option to generate the processing instruction form fields using Microsoft Word's
hidden font effect. Hidden text is hidden in the print preview. You can display or hide the hidden text

157
by selecting or deselecting the “Hidden text” option in the Display options of Microsoft Word
Options.

Form field size

The Large option inserts the BI Publisher code in a document variable. The document variable field
can accommodate approximately 48 kilobytes of code line.

Note that this setting affects only fields that are created or edited while this option is set.

Table Header Color

When you insert a table by using the Table Wizard or the Insert Table/Form dialog box, the
Template Builder applies the table header color specified here to the table header background. Use
this feature to customize the default color for your templates.

Generate XSLT 2.0 compliant code

BI Publisher uses the XSLT processor provided by Oracle XDK 11.1.0.7.0, which supports the W3C
XSL Transformations 1.0 recommendation. The processor also implements the current working
drafts of the XSLT and XPath 2.0 standards. For more information about Oracle XDK see Oracle
XML Developer's Kit Programmer's Guide 11g.

By default, BI Publisher is compatible with XSLT 1.0. If you wish to use XSLT and XPath 2.0
features in your template enable this option. This configuration is performed at the template level.
The template-level setting will override the server setting.

This concludes the "Setting Configuration Options for Template Builder" topic.

Summary

In this tutorial, you have learned how to:

Install Template Builder successfully


Create an RTF template in the Offline mode
Create an RTF template in the Online mode
Create a chart and a pivot table in an existing template
Configure Template Builder settings

Credits

 Lead Curriculum Developer: Sindhu Rao


 Other Contributors: Kasturi Shekhar, Mike Donohue, Pradeep Sharma, and Daniel Milne

158
Where Are Configuration Files Located?
Oracle Business Intelligence configuration files, used to configure the behavior of the system,
are found in various locations within the Middleware home.

Each host has its own set of configuration files for the components that are deployed on that
host.

Oracle Business Intelligence system component configuration files can be found under:

MIDDLEWAREHOME\ORACLE_INSTANCE\instancen\config\COMPONENT\bi_component_nam
e\

For example, the configuration file for the Oracle BI Server might be located in:

159
MIDDLEWAREHOME \instances\instance1\config\OracleBIServerComponent\
coreapplication_obis1

BI
Comp Configuratio
onent n File File Location
Oracle NQSConfig.I ORACLE_INSTANCE\config\OracleBIServerComponent\coreapplication
BI NI _obisn
Server
logconfig.xml For example:

\instances\instance1\config\OracleBIServerComponent\coreapplication_o
bis1

Note: Although DBFeatures.ini is also located in this directory, do not


edit this file directly. See Oracle Fusion Middleware Metadata
Repository Builder's Guide for Oracle Business Intelligence Enterprise
Edition for information about how to edit features for a database.

Oracle instanceconfig ORACLE_INSTANCE\config\OracleBIPresentationServicesComponent\c


BI .xml oreapplication_obipsn
Presen
tation For example:
Servic
es \instances\instance1\config\OracleBIPresentationServicesComponent\cor
eapplication_obips1

Note: Do not add elements to the instanceconfig.xml file unless you are
overriding the stated default values. Override only those settings that are
necessary for configuring the system to meet the needs of your
organization.

Cluster ClusterConfig. ORACLE_INSTANCE\config\OracleBIApplication\coreapplication


Contro xml
ller For example:
ccslogging.xm
l \instances\instance1\config\OracleBIApplication\coreapplication

160
BI
Comp Configuratio
onent n File File Location
Oracle instanceconfig ORACLE_INSTANCE\config\OracleBISchedulerComponent\coreapplicat
BI .xml ion_obischn
Sched
uler ccslogging.xm For example:
l (for Cluster
Controller) \instances\instance1\config\OracleBISchedulerComponent\coreapplicatio
n_obisch1

JavaH config.xml ORACLE_INSTANCE\config\OracleBIJavaHostComponent\coreapplicati


ost on_obijhn
logging_confi
g.xml For example:

\instances\instance1\config\OracleBIJavaHostComponent\coreapplication
_obijh1

Oracle bridgeconfig.p MW_HOME\user_projects\domains\domain_name\config\fmwconfig\bii


BI roperties nstances\coreapplication
Presen
tation For example:
Servic
es mw_home\user_projects\domains\bifoundation_domain\config\fmwconfi
Plug- g\biinstances\coreapplication
in

PAGE INTENTIONALLY LEFT BLANK

161

You might also like