BI Publisher Tutorial Lesson 2
BI Publisher Tutorial Lesson 2
BI Publisher Tutorial
Lesson 2 – Create, Format and View a Simple Report
Using Real Data
IMPORTANT: You must use the SFIS TEST Database to complete this exercise. The PeopleSoft elements
(e.g. Data Source and Report Definition) must not be created in Production, only in TEST. Click here to
open the page containing the link to the SFIS TEST LOGIN: SFIS QUICK LINKS/ LOGIN
As you learned in Lesson 1, the major steps of the BI Publisher process fall into the general areas of
Design Time and Run Time.
• In this lesson you will generally follow those same steps, but not in the same order.
• There will be differences in what the Template process will look like and the timing of the Data
Source registration. As you will see, it is possible to use an existing Data Source.
• You will be introduced to some ideas that will aid you by saving time and effort when working
with your templates and help you produce better looking reports.
• Important: Keep in mind that this is real data, not live data.
• This is the output of a query as it existed at the point in time that the query was
downloaded/saved.
• It will not contain live data unless the query has been registered as the Data Source in
PeopleSoft and won’t appear in its final form until the Template and Report Definition
are linked.
• The steps for working with real data rather than sample data are in the following order.
• You’ll see that the step to register the Data Source with BI Publisher occurs after the Template is
edited and before the report is published – and only if the query has not already been
registered. That is, you do not need to create the Data Source until you want to test the
report online, via PeopleSoft.
One of the advantages of working with real data is that you can do a lot of your mocking up directly in
the Template since you are pretty much previewing how the ultimate report will look. This will be
explained in more detail below.
• PEOPLESOFT TEST: In order to use real data, start with the Query previously created in the SFIS
PeopleSoft Test Database.
• However, as stated above, you will not be registering it as a Data Source until you want to test
the report online.
• There are two ways of creating the real data XML file from PeopleSoft Query:
1. If you are working in the original Query or creating a new query, do the following:
Run the Query. Using the link named Download to XML, download and save
the XML file to the directory where you have stored similar files.
Save this XML file with a different name that indicates it contains real data.
For example, in this demonstration, the real data XML file is named:
WES_SFIS_TRAIN_COUNTRY_FORMAT1-REAL DATA.xml
2. If the original Query is not open and it’s ready to be downloaded, you can save it to
XML from the Query Manager page list of queries by clicking on the link XML in the
column headed Run to XML:
You can Save and/or Open the file in the directory where related files are
located.
You can open the real data XML file to take a look at it. The first few lines should resemble this:
• This XML file contains the current output of the Query as of the time you saved the XML file.
• You’ll see that the contents of the fields appear here, e.g. “A,” “Afghanistan,” “AFG,” and so on.
• Once the XML file containing the real data has been saved, open MS Word.
• Select Add-Ins from the menu.
• To gain access to the data in the XML File, click on the Data menu and select Load XML Data
• To begin inserting the fields and formatting the template, click on Insert.
• For this example, the method to insert the fields into the Template will be Table/Form, the third
option. Select Table/Form.
• Below are the three main sections that make up Table/Form dialog: Data Source, Template and
Properties.
o You will be selecting the desired fields from the left section (Data Source) and placing
them in the middle section (Template).
o The fields are displayed in the first section as a tree.
• Click on Row under Data Source, and drag the cursor to the middle section under Template.
• When you release the button, the first two sections will look like this.
o When you drag an element with children (other elements below the element), the
following pop-up dialog appears.
• Click on the pop-up dialog, selecting Drop All Nodes. The tree starting with Row now appears in
the middle, Template, section.
o Note: A Node is a term used in tree views for an element in the tree view.
• The Data Source and Template sections now look like this:
• On the report we only want to show the fields Expr5_5, Descr, Country, Country 2char and Eu
Member State. In order to do that, you either:
o drag and drop @rownumber back to the left section, or
o right click on @rownumber and click Delete
• The Template section now looks like this:
You can observe attributes of the fields under the Properties section by clicking on the
individual fields in the Template section. For definitions of the Properties terms, one source is
page 7 in the Oracle document: Welcome to Oracle BI Publisher Template Builder for Word
10.1.3.3.0!
o Below is an example of the Template, Properties and Preview sections when you click
on Row.
o If you were to click OK at this point, the template would be a simple list resembling the
table in the Preview panel under Properties. In order to format the fields as desired,
you need to group the rows as described here:
° To group each alphabetical set of countries by a letter (Expr5_5):
• Select the node “Row”
• Under Properties, set Style to “FreeForm” (i.e., change it from “Table.”
• Set Grouping to “EXPR5_5” in the Properties section.
• The Sort by will change to EXPR5_5. Leave as is.
o The Template, Properties and Preview sections will now look like this:
• If you haven’t saved the file as an RTF yet, since this is the first time you’re running a Preview,
you will receive the message prompting you to save the file as an RTF.
• Once you do so, the first part of the table will appear as follows, displaying real data:
• If you’re satisfied with the formatting of the report, save the RTF file.
• You can now proceed with the next steps.
If needed, navigate to the Data Source page: Reporting Tools > BI Publisher > Data Source
• New Query: You would need to register your Query as a Data Source if was a new query that
you had not yet registered. In that case, you would follow the instructions in Lesson 1 for
registering a Data Source.
• Original Query – Existing Data Source: For this exercise you will be using the original query as
the Data Source. You do not need to open the Data Source page if you have not made any
changes to the Query:
° Since your Query has already been registered as a Data Source, you do not need
to register it again nor do you need to save the Sample XML Data File again.
° Exception: BUT If you have done any work in the Query, you should:
• Regenerate the Data Source and Schema on the Data Source page,
and…
• Save the newly updated Sample data XML File again to the directory.
• In this step we relate the recently saved Template with the Data Source
(WES_SFIS_TRAIN_COUNTRY_FORMAT1) in PeopleSoft. The instructions are essentially the
same as those in Lesson 1.
o Note: This is a new Report Definition.
• Begin by navigating to Report Definition: (Reporting Tools > BI Publisher > Report Definition)
• Click on Add a New Value. When the next page opens, enter a Report Name. There is a 12-
character limit.
• Data Source Type: The default should be set to PS Query. If it is not, select PS Query.
• Data Source ID: In this dropdown box you can search for the query by typing in all or the first
few letters of the query name. If you do not type in the entire name, a list of queries will be
displayed that you can choose from. Select the original Data Source name. In this example, it is
WES_SFIS_TRAIN_COUNTRY_FORMAT1
• Click the Add button. The following group of pages will appear:
• Start with the Definition page which displays the Report Name just created, WES_COUNTRY2.
• Enter a descriptive name for the report in Report Description. There is a 30-character limit.
• Under Report Status, change In Progress to Active. This is required in order to proceed.
• Under Report Category ID, select an appropriate Report Category (i.e. a Report Category
security group to which you belong).
• Owner ID: Select PeopleTools
• Set the Template Type as RTF if it is not already
• Retention Days: Leave blank
• The Definition page should now appear as follows:
• In order to save the Report Definition, you must first associate a Template with it.
• Click on the Template tab. Notice that the Report Name is displayed at the top. There is now a
Template ID that consists of the Report Name plus “_1” (WES_COUNTRY2_1).
• There can be multiple Templates associated with each Report Definition, and each one will end
with a succeeding number.
• Upload the RTF Template by clicking on the yellow Upload button (Note: In Internet Explorer,
you may need to hold down the CTRL key at the same time).
o A popup menu will appear prompting you to browse for the RTF Template file you
recently created. Click on the Browse button and navigate to the location of the file.
o After you browse and locate the RTF Template file, click on the yellow Upload button to
upload the file.
o Once you have uploaded the template, you will see the following at the bottom of the
page, in the Template Files section.
o Notice that in the original name there were spaces: BI Tutorial Country 1 – Real
Data.rtf. When its name is displayed here, the spaces are replaced by underscores:
BI_Tutorial_Country_1_-_Real_Data.
o By clicking on the yellow Preview button, you can run a Preview at this point, which will
be similar to the PDF previews you saw before, i.e. it will contain sample data and it will
not display the Conditional Formatting that you created.
o This Preview, however, is an RTF file.
o The beginning of the file looks like this:
• For this Lesson we will only be reviewing the Query Report Viewer method of publishing a
report in order to demonstrate how the final report will appear.
• Navigate to the page - Reporting Tools > BI Publisher > Query Report Viewer
• On the Query Report Viewer page, enter the Report Name and click the Search button.
• The row for the Report Name appears on the page as follows:
• You’ll see that the Format is shown as RTF which you should leave as is.
• Click on the View Report link. Open the file. You could also Save it at this time if you wish.
• The entire first page (1 of 7) resembles the following. You will recall that when you set up the
Conditional Formatting you checked the box for the Conditional Formatting to Apply to Entire
Table Row, and you can observe that in the report.