USM Regional Conference

PeopleTools Release 8.48
November 16, 2007

XML/BI Publisher

What is XML Publisher?
Starting in release 8.48, Oracle XML Publisher (XMLP) was incorporated into PeopleTools to enhance the reporting capability of PeopleSoft Applications. XML Publisher is synonymous with BI Publisher (Business Intelligence). The two terms are interchangeable.

Page 2

What is XML Publisher?
XML Publisher is a Java-based reporting tool that makes report generation more efficient by separating the data extraction logic from the report layout.
Data Extraction XML Publisher Report Layout Report Output

Page 3

What is XML Publisher?
Report templates can be created using common software such as Microsoft Word, Excel, Adobe Acrobat, etc., while data sources can come from PeopleSoft Queries, rowsets, XML document objects, or XML files. The separation of data sources and report templates allow end users to modify the report layout, using familiar desktop applications, without the assistance of technical developers once the data source of the report is created.

Page 4

Running a Query-Based XMLP Report
Main Menu > Reporting Tools > XML Publisher > Query Report Viewer

Page 5

XMLP Report Output Types There are four XMLP report output types: HTM PDF RTF XLS Page 6 .

Data Source Let’s examine the data source for the delivered report that we just ran: Main Menu > Reporting Tools > XML Publisher > Data Source Page 7 .

Types of Data Source There are four types of XMLP report data sources: PS Query Rowset XML File XMLDoc Page 8 .

Report Definition It is in the Report Definition that a Data Source is associated with one or more layout template files. Navigate to the Report Definition component. Page 9 . Open up the report definition named JPM_CATI_RPT (“Content Items Report”).

Report Definition Main Menu > Reporting Tools > XML Publisher > Report Definition Page 10 .

Report Definition .Template Page 11 .

In order to be available at runtime.Template Notice the Level 1 and Level 2 scroll areas on the Template page. a template file must be “Active”.Report Definition . Each report can have multiple templates. any of the templates can be specified. Page 12 . Each template file assigned to a template must have a unique effective date. When the report is run. But only one template can be the default template. Notice that each template can have one or more template files associated with it.

downloaded. Page 13 . Therefore. template files can be uploaded. generic data is used to provide an example of the layout of the report. and previewed.Template You will not be able to save a report definition unless it has been associated with at least one active template file. On the Template page. you must design the layout of your report (the template) before you can create the report definition. When you preview a template.Report Definition .

Setting Up XML Publisher Setting up your PeopleSoft system to use XML Publisher requires just a few steps. This will make it easier to design RTF templates for your reports. There must be at least one “Report Category. The XDO configuration file identifies the location of the cache directory for your application server domain. It is a good idea to install the Template Builder plug-in for Microsoft Word.” which is a required attribute for all report definitions and sub-templates. Page 14 .

if your application server domain is called CSDMO90. the system-tempdir setting in the xdo.” The value for this property must point to the CACHE directory for your application server domain. Page 15 .cfg”. One of the “property” tags in this file identifies the “system-temp-dir. For example. under “PSHOME” you will find a file called “xdo.Setting Up the XDO Configuration File In the “appserv” directory.cfg file would be: [PS_HOME]/appserv/CSDMO90/CACHE.

<property name="pdf-open-password">user</property> --> <!-. where the name of the application server domain is HRDMO90 (The Application Server does not need to be restarted after the xdo.<property name="pdf-security">true</property> --> <!-.PDF Security --> <!-.System level properties --> <property name="xslt-xdoparser">true</property> <property name="xslt-scalable">true</property> <property name="system-temp-dir">T:\PT848\appserv\HRDMO90\CACHE</property> <property name="system-cachepage-size">50</property> <!-.<property name="pdf-permissions-password">owner</property> --> </properties> </config> Page 16"> <properties> <!-.0" xmlns="http://xmlns.PDF compression --> <property name="pdf-compression">true</property> <!-.cfg file is modified): <config version="1.0.Setting Up the XDO Configuration File This example is from a Windows server environment.

Setting Up Report Categories Report Category is a required field for all report definitions and subtemplates. Page 17 . There is one delivered report category: ALLUSER. Report categories define groups that enable control over who can access and edit report definitions and subtemplates.

Setting Up Report Categories Main Menu > Reporting Tools > XML Publisher > Setup > Report Categories Page 18 .

Much of the basic syntax that is necessary will be imbedded in the form fields in the Word document. You must have Microsoft word installed prior to installing the plug-in. and easily map the tags in the XML file to fields that appear in the report. It allows you to associate an XML file with a report template.The Template Builder for Microsoft Word This plug-in for Microsoft Word helps facilitate the development of RTF template documents in Microsoft Word. Page 19 .

The Template Builder for Microsoft Word The following navigation will allow you to download the Template Builder for Microsoft Word: Main Menu > Reporting Tools > XML Publisher > Setup > Design Helper Page 20 .

The Template Builder for Microsoft Word You can also find the Design Helper in the <PSHOME> directory: <PSHOME>\webserv\<webservername>\ applications\peoplesoft\PORTAL\ps\xmlp\ Page 21 .

Create a Query. 2. Page 22 . Create the Data Source. 4. 5. Create the Template.Steps to Create Your Own XMLP Report You can create your own XMLP report using the following steps: 1. Create the Report Definition. Run and test the XMLP Report. 3.

XMLP Roles In order to run or develop XMLP reports. XMLP Report Developer (Creating XMLP definitions). the users need these roles: XMLP Power User (Running XMLP reports). Page 23 .

Step 1: Creating a Query Main Menu > Reporting Tools > Query > Query Manager Page 24 .

select Add a New Value: Main Menu > Reporting Tools > XML Publisher > Data Source Page 25 .Step 2: Creating the Data Source On the “Data Source” search page.

click on each of the Generate hyperlinks near the bottom of the page. Page 26 . Save the Data Source definition.Step 2: Creating the Data Source When the Data Source page displays.

Page 27 .Step 2: Creating the Data Source Click on the hyperlink for the Sample Data File.

Step 2: Creating the Data Source Save that XML file to an appropriate directory. You will need to retrieve it in the next step. Page 28 . when you import it into your report template.

Step 3: Creating the Template Open up Microsoft Word. Page 29 . provides a new pull-down menu and a tool bar menu. that was installed earlier. The Template Builder.

Set the left and right margins to 0. select “Page Setup…”.5”. Page 30 . Under the “File” menu.Step 3: Creating the Template Start a new document in Word.

click on the Data menu. and select “Load XML Data…”: Page 31 .Step 3: Creating the Template On the Template Builder menu.

A message will appear indicating that the data was successfully loaded. Page 32 .Step 3: Creating the Template Select the XML file that was created when you saved the sample data file while defining the data source.

Page 33 .Step 3: Creating the Template Save the Word document as an RTF file.

Step 3: Creating the Template Put a title at the top of the document and center the text: Below the title. on the left side. One line below. type the following text: “Query Name:”. type “Number of Rows:” Page 34 .

Apply the same technique with the @numrows field.” From the Template Builder menu. select “Insert. Page 35 . The Field Creator dialog will appear. Find the @queryname field in the list. Field…”.Step 3: Creating the Template Place your cursor in your document to the right of the text “Query Name. Double-click on it so it appears to the right of the corresponding label you have created in your report.

Step 3: Creating the Template Page 36 .

under the fields you just added. Click on the Insert menu and select “Table/Form…”: Table Structure Window Page 37 .Step 3: Creating the Template Create a blank line or two in your document. A table is a convenient way of displaying the results of our query because there are multiple rows of data.

click on the word “Row” (which appears bold) and drag it into Table Structure window in the middle. When the pop-up prompts you to choose from three menu items.Step 3: Creating the Template In the Data Source window on the left. Page 38 . select “Drop All Nodes”.

Step 3: Creating the Template You have defined the structure of the row for the table. Page 39 .

Step 3: Creating the Template Click the “OK” button to insert the table into your document. Save the document again. Page 40 .

Notice that four different types of output are available for preview: PDF. HTML. and RTF.Step 3: Creating the Template Click Preview on the Template Builder menu and select PDF. Page 41 . The preview does not use real data. Excel.

Step 3: Creating the Template Page 42 .

Step 4: Creating the Report Definition Main Menu > Reporting Tools > XML Publisher > Report Definition Page 43 .

Step 4: Creating the Report Definition Page 44 .

Page 45 .Step 4: Creating the Report Definition Note: You will not be able to save a report definition unless it has at least one active template file assigned to it. Select the RTF template file that you have previously defined. Click the Upload button.

Step 5: Running and Testing the XMLP Report Main Menu > Reporting Tools > XML Publisher > Query Report Viewer Page 46 .

Only one template can be the default template for a report definition.Modifying the Template After you test a report. Each template must have at least one active template file associated with it. Within each template. Your modified template will not be applied to the report until you re-associate it with the report definition. each template file must have a unique Effective Date. Each report definition can have multiple templates defined. Page 47 . you may decide to make changes to it to improve the layout.

There is no need to change or update any setting in the data source definition or report definition. this will not be reflected in the report until you regenerate the sample data and schema files associated with the Data Source definition. Page 48 .Modifying the Query Definition Any changes you make to the criteria in the query that affects the number of rows returned will be reflected the next time the XMLP report is run. If you add more fields to an existing query (modifying the SELECT clause). Also. you need to modify the report template to show the new field(s) and associate the new template with the report definition.

When you are defining a table. Page 49 .Sorting Data You have the option of defining the sorting rules in the query definition. But you can also specify sorting preferences in the template of the report. You can dictate the sorting rules while defining a table or you can do it in a more manual way by inserting the code into the template directly. you have the option of sorting the rows by any column in that row.

Sorting Data When you click on the word “Row” in the middle of the Insert Table/Form dialog box. the “Sort by” field appears along with several other options on the right. Page 50 .

or . not the “Insert” menu item in the Template Builder menu.gif. place your cursor in that position. After you decide where you would like an image to appear in your report.png file into a template. Page 51 .Adding Images to Your Reports You can insert a .jpg. click Insert > Picture > From File… Use the “Insert” menu that is part of the regular Word menu. In MS Word. .

XML Publisher supports the use of “if” statements.Conditional Formatting You can choose to change the formatting of your report output based on whether or not a certain condition is met. Page 52 . The following syntax is placed at the beginning of the conditional area: <?if:condition?>. The following syntax is placed at the end of the conditional area: <?end if?>.

you have to define a “Text Form Field.” If you choose to hide the syntax in a form field.” Make sure the “Forms” toolbar is visible in Word. you can insert the appropriate syntax directly into the template or place the syntax in a “Text Form Field.Conditional Formatting To insert an “if” statement in your MS Word template. Page 53 .

USM Regional Conference Wrap Up and Additional Questions Page 54 .

Sign up to vote on this title
UsefulNot useful