XML Publisher
Overview
Separate data/ layout/ translation
More flexibility
Data Logic
Layout Template
Translation
Reduced maintenance
XML Publisher
Report Output
BI Components
Reporting Tools
Reporting Tools
Crystal Reports
Close in functionality.
Consider XMLP for new reports.
XML Publisher is not dependent on windows.
nVision
SQR
XML Publisher
Integration
Adobe Acrobat
RTF
Microsoft Word
with Plug-in
Template Manager
Template
XML
PSQuery
HTML
Connected
Query
Xml file
Data
Handler
XML
XMLP
Engine
PDF
RTF
Process
Scheduler
Printer
Repository
e-commerce
XML Publisher
Phases
Set up XML Publisher
Bursting
<PayChecks>
<PayCheck>
<EmpId>1000</Empld>
<DeptId>01</DeptId>
<Salary>1000</Salary>
</PayCheck>
<PayCheck>
<EmpId>1001</Empld>
<DeptId>01</DeptId>
<Salary>1000</Salary>
</PayCheck>
<PayCheck>
<EmpId>1002</Empld>
<DeptId>02</DeptId>
<Salary>1000</Salary>
</PayCheck>
</PayChecks>
Bursting by EMPLID
1001
1000
1002
Bursting by DeptID
EmpID:
1000
1001
DeptID: 01
EmpID:
1002
DeptID: 02
Translation
Report Definition
Layout 1
Template File
En 01/01/07
XLIFF de
XLIFF es
Layout 2
Template File
En 01/01/07
XLIFF jp
XMLP Report
Developer
(PTPT2600)
PeopleSoft User
(PTPT1000)
Report Category
Yes
No
No
Design Helper
Yes
Yes
No
Global Properties
Yes
No
No
Data Source
Yes
No
No
Report Definition
Yes
Yes
No
Content Library
Yes
Yes
No
Yes
Yes
No
Query Report
Scheduler
Yes
Yes
No
Report Repository
Yes
Yes
Yes
Objectives
Data Sources
XML Publisher supports the following data sources:
Data Source
Description
PeopleSoft Query
Connected Query
XML File
Data Generation
Data Extraction
Database
Data Source
Extract
Data
PS/Query
PS/Query
Connected
Connected
Query
Query
AE
PeopleCode
File Layout
XML file
PS Query
PS
XML File
XML File
XML declaration
Root element
Data Content
<?xml version="1.0"?>
<root>
<ITEMS>
Start tag
<ITEM_CD>001</ITEM_CD>
<DESCR>Laptop</DESCR>
<PRICE>800.00</PRICE>
</ITEMS>
<ITEMS>
End tag
<ITEM_CD>002</ITEM_CD>
<DESCR>Desktop</DESCR>
<PRICE>650</PRICE>
</ITEMS>
</root>
Well-Formed XML
Document
The XML File can be any well-formed XML file, such that:
An XML document must have one root element
An element must have matching start and end tags names, unless
they are empty elements
Elements can be nested, but can not overlap
All attributes values must be quoted
Attribute names must be unique in the start tag of an element
Comments and processing instructions do not appear inside tags
The < or & special characters cannot appear in the character data of
an element or attribute value
Data Source
A data source stores the sample XML file and optionally the schema file in
the database.
Sample
XML File
.xml
Preview Report in database
Schema
.xsd
Use PDF template
Data Source
Registration
Benefits of data source registration include the ability to:
Reuse the data source with multiple report definitions.
Perform iterative template development.
Preview the template.
Take advantage of built-in bursting functionality when the data
schema file is registered.
Default Data
Source Type
Select existing
query
Uploading Data
Source
For non-query data sources the related sample data and schema files
must be uploaded into the database.
Reporting Tools, XML Publisher, Data Source, Add a New Value, enter data
source type and name, Add
Creating Templates
Objectives
Template Types
Downloading PS
Query Sample File
To create an RTF template for a PS Query sample file:
When the sample data has been loaded, you will not see the data
displayed until you select one of the Insert options.
Insert Menu
The plug-in provides the ability to insert data fields into your document
Insert Menu
Description
Field
Table/Form
Chart
All Fields
Inserting Fields
To insert fields into the Word document:
1.Select Insert, Field.
2.Position the cursor where you want to insert the field.
3.Select the field from the Field Dialog box.
4.Click Insert.
You can also double-click the field in the dialog box to insert the field.
You can either select another data field or close the dialog by clicking the
Close button
Preview Data
You can preview the report in:
PDF
HTML
Excel
RFT
In this activity, we will create a report template for Employee and Their
Address.
Step 2: Select
Report Data
Select the data set to use for the table
Step 3: Select
Data Fields
Select the data fields that will be shown in your report
Grouping Layout
Options
Group Left
Grouping
Header
Grouping
Field
Grouping Header
Header 1
Header 2
Header 3
Header 4
Header 5
Data 1
Data 2
Data 3
Data 4
Data 5
Group Above
Grouping Field 1
Header 1
Header 2
Header 3
Header 4
Header 5
Data 1
Data 2
Data 3
Data 4
Data 5
Step 5: Sort
Report
You can sort the data in the table by up to 4 different fields
Step 6: Headers/Labels
You can change the default labels / column headers
Table/Form
Advanced
The Advanced option uses drag and drop to select the fields to insert into your
template:
Pivot Table
Designing PDF
Templates
The source of the PDF document does not matter, Possible design options
are:
Design the layout of your template using any application that
generates documents that can be converted to PDF.
Scan a paper document to use as a template.
Download a PDF document from a third-party Web site.
Form Fields on
PDF Template
PDF Guidelines
The following guidelines need to be adhered to when working with PDF
templates whether or not you are mapping PDF template fields and tags:
The PDF document must allow editing.
Files must be Adobe Acrobat 5.0 compatible.
Files must have form fields for the placement of application data, with
each field tag being unique.
Files should not have embedded javascript.
Review
In this lesson, you learned that:
XML Publisher supports RTF, PDF, eText and XSL templates.
The Template Builder plug-in is used to create RTF templates.
The Table/Form wizard allows you to easily create standard reports.
PDF templates contain form fields that will display the data from the
XML input file.
Sub-Template
Sub-templates can be created that contain formatting and data fields that
are used in multiple templates.
Within a single sub-template file, multiple sub-template components can
be available.
Start and end template indicators must exist to distinguish those various
components.
<?template:component_name?>
<?end template?>
Sample SubTemplate
<?template:header?>
EMPLOYEE DETAILS
<?end template?>
<?template:address?>
Pleasanton Campus
500 Oracle Lane
Pleasanton, CA 94488
<?end template?>
Define sub-template
Importing SubTemplate
<?template:header?>
XMLP Training
<?end template?>
Sub1.rtf
Define sub-template in
Content Library
Import sub-template
into a template
<?import:psxmlp://TRAINING?>
<?call-template:header?>
Importing SubTemplate
To import a sub-template file that is stored in the Content Library, use
this syntax:
<?import:psxmlp://sub-template_NAME?>
Where sub-template_NAME is the registered sub-template ID in the
Content Library
To preview a sub-template in Word, use this syntax:
Note the triple slashes and the use of the actual file name instead of the
<?import:file:C:///Directory/subtemplate_file.rtf?>
template ID
Calling the
Template
Use this syntax to call the template:
<?call-template:template_name?>
Example:
Passing
Parameters
By default, PeopleTools( through the ReportDefn class ProcessReport
method) always passes the following parameters/tags:
<?$ReportID?>
<?$ReportTitle?>
<?$RunDate?>
<?$ReportID?>
<?$RunTime?>
Report Template
The declaration is defined in the Help Text
<xsl:param
name="ReportID"
xdofo:ctx="begin"/>
Declaration in primary
template
Demo: Adding a
Sub-Template
In this activity, we will create a sub-template and use it in our student letter.
Objectives
By
Report Definitions
Report definitions are used to:
Associate a data source with a template.
Define output options.
Grant security to view report.
Define bursting options.
Report Definition
Pages
Page
Description
Definition
Template
Output
Security
Bursting
Definition Page
Template Page
A report may have multiple templates
Multiple templates
can be assigned
web posting,
printer, fax
Output Page
Default
displayed at
runtime on
prompt or
run control
Output Format
Options
Template Type
Output Options
RTF
Etext
txt
XSL
Security Page
Use the Security page to:
Indicate whether the report requestor can add to the standard
Distribute To values on the Process Scheduler Request, Distribution
Detail page.
Define the roles or users who can:
View web-posted output in the Report Manager repository.
Use the XML Publisher Report Repository Search page.
In this demo, we will create two report definitions one for student letter and
one for course listing.
Bursting
When you generate a bursted report, separate document files are created
for each unique data value for a specified field tag.
<row rownumber="1">
<BU>NAM01</BU>
<LOC>TEA</LOC>
</row>
<row rownumber="2">
<BU>NAM01</BU>
<LOC>PHI</LOC>
</row>
<row rownumber="3">
<BU>NAM02</>
<LOC>ATL</LOC>
</row>
NAM01
NAM02
Bursting Page
Data attribute to burst by
Template or
translation for
each burst file
assigned at
runtime
Report file
security
assigned at
runtime
Burst By
The reports data source must have an associated schema file. The
schema is used to:
Identify the highest level repeating group (node) in the XML source.
Identify node tags.
Schema
Highest level
repeating node
Template
This feature dynamically drives the template assignment at runtime based upon
the data value of a designated schema tag.
Field
Description
Template controlled by
Data Value
Template ID
Language
Search Keys
Delivered search keys include:
Burst By
Report Definition Name
Generated On Date
Additional search keys may be defined to provide even more specific
granularity
Content Library
Page
Runtime
The complete template (primary and sub-templates) is systematically
assembled by the XML Publisher engine during report generation. The
same occurs during online previewing as long as the sub-template file
exists.
The report in which the sub-template is placed must have a related data
source that supplies data for form fields on the sub-template or the data
must be passed in as runtime parameters.
Runtime parameters
In this demo, we will register the sub-template we created for the student
letter and update the report definition to use the template that contains the
sub-template.
Translations
Localization Interchange File Format (XLIFF) .xlf file processing is used for
translations:
Report Definition
Layout
Layout
XLIFF jp
Translation
Components
The Template Translation component interfaces with both report definition
templates and Content Library sub-templates.
Template translation files can be created only when a reports template
type is RTF.
Template Translation is a separate component with no row level security,
as the target user is different from the report developer, requestors, or
viewers.
Advanced Search
Reporting Tools, XML Publisher, Translations,Advanced Search
Objectives
By
Query Report
Viewer
Reporting Tools, XML Publisher, Query Report Viewer
Existing Query security applies so that each user has access to run only
the reports to which he or she has qualified Query access to the data
source.
Query Report
Scheduler
Query Report Scheduler uses the existing Process Scheduler functionality
to:
Select runtime parameters for query-based reports.
Monitor the report process request.
Post and secure the results to the Report Manager, a printer, or the
Process Scheduler file directory.
Query Report
Scheduler Page
Reporting Tools, XML Publisher, Query Report Scheduler
Select the report
XML Publisher
Report Repository
The XMLP Report Search page allows you to filter criteria to search for reports.
Reporting Tools, XML Publisher, XML Report Search
XMLP Report
Search
You can use additional Search keys defined in the report definition to
narrow down the search:
Report Manager
In Report Manager, you can also search for reports using filters.
Reporting Tools, Report Manager
XML Publisher
Classes
Prepare Data
PSXP_XMLGEN
(XML Generation Classes)
PSXP_RPTDEFNMANAGER
(Report Definition Manager Classes)
Generate and Route
Reports
PSXP_ENGINE
(Engine Classes)
Search Reports
Repository
PSXP_REPORTMGR
(Report Search Classes)
Application
Packages
For importing the XML Publisher classes, PeopleSoft recommends that you
import all the classes in the application package
Class Category
Application Package
PSXP_RPTDEFNMANAGER
PSXP_REPORTMGR
PSXP_XMLGEN
PSXP_ENGINE
Importing Classes
An import statement names either all the classes in a package or one
particular application class.
Your import statements should look like the following:
import
import
import
import
PSXP_RPTDEFNMANAGER:*;
PSXP_REPORTMGR:*;
PSXP_XMLGEN:*;
PSXP_ENGINE:*;
Using the asterisks after the package name makes all the application
classes directly contained in the named package available. Application
classes contained in subpackages of the named package are not made
available.
Publishing a
Report
Sample PeopleCode to
Publish
1.
import PSXP_RPTDEFNMANAGER:*;
2.
Sample
PeopleCode to
Publish
3. Instantiate
the report definition object and initialize it.
(continued)
&rptDefn = Create ReportDefn(&rptDefnId);
&rptDefn.Get();
4. Specify the data for the report.
&rptDefn.SetRuntimeDataXMLfile(&xmlfile);
5. Process the report.
Data Source
Method syntax
PSQuery
SetPSQueryPromptRecord(&Record)
Connected Query
XML file
SetRuntimeDataXMLFile(FilePath)
ProcessReport
Use the ProcessReport method to generate a report and store the
information.
Syntax
Publish
Use the Publish method to publish the current report definition
Syntax
Displaying a
Report
You can display a report online using the DisplayOutput method, commit
prior to issuing the DisplayOutput.
Application Engine
Program
Using the same XML Publisher PeopleCode classes, you can create an
application engine program to run XML Publisher reports.
To run the application engine program through the Process Scheduler, you
will need to:
Create a new Run Control page or associate the application engine
program with an existing Run Control page.
Create a Process Definition.
%Select(PT_XRFWIN_AET.OPRID,
PT_XRFWIN_AET.RUN_CNTL_ID,
PT_XRFWIN_AET.LANGUAGE_CD)
SELECT OPRID
, RUN_CNTL_ID
, LANGUAGE_CD
FROM %Table(PRCSRUNCNTL)
WHERE OPRID = %OperatorId
AND RUN_CNTL_ID = %RunControl
/* process report */
&oRptDefn.ProcessReport("", PT_XRFWIN_AET.LANGUAGE_CD,
%Date,
&oRptDefn.GetOutDestFormatString(%OutDestFormat));
/* send output to destination */
If %OutDestType = 6 Then /* Web */
&oRptDefn.Publish("", "", "",
PT_XRFWIN_AET.PROCESS_INSTANCE);
Else
If %OutDestType = 3 Then /* Printer */
&oRptDefn.PrintOutput(%FilePath);
End-If;
End-If;
Process Definition
When you create the process definition use process type XML Publisher.
XML Publisher
Creating File
Layouts
Sample File
Layout
Multi-level file layout
File Layout
Output format XML file
PeopleCode to publish
report based on XML File
data source
The File Class contains methods to write to files defined by a file layout
definition:
WriteRecord(record)
WriteRowset(rowset)
Review
In this lesson, you learned that:
XML Publisher reports that have a data source of PS Query can be
selected and viewed using the Query Report Viewer.
The Query Report scheduler page can be used to schedule XML
Publisher Reports with a data source of PS Query.
You can view XML Publisher reports using XMLP Report Search or
Report Manager.
The XML Publisher classes enable you to access the runtime portions
of the XML publishing process programmatically, that is, after the
templates and reports have been created.
The XML Publisher classes can be used in application engine programs
to publish XML Publisher reports.
PDF Template
Reports are pre rendered PDF forms that are populated with data at runtime.
Starting in PeopleTools 8.50 nested structures are supported..
This template type is suitable when you have existing PDF forms that you need
to use to generate reports, such as government forms.
Generally, using this template type is faster than using RTF templates because
no runtime rendering is involved.
Use PDF templates when:
You already have PDF templates that you must use (for example, government
forms).
You have simple form-based reporting requirements with no complex formatting,
that is, no charting, dynamic tables, dynamic repeated fields, and so forth.
PDF Template
PDF templates do not require an external plug-in for offline template design.
A mapping feature for XML data element tags is enabled when the PDF template
file is uploaded to the Reporting Tools, BI Publisher, Report Definition, Template
page. The BI Publisher PDF mapping functionality enables you to match existing
form fields in a PDF template with sample data field tags
.
You only need to do mapping, if the form field names in the PDF template do not
match the tag names in the XML data. This is usually the case when you are
using a third-party PDF template (such as government form) and when it is not
easy to customize the tag names in XML data to match the PDF form fields.
PDF Template
Guidelines when working with PDF templates :
The PDF document must allow editing.
Check the Security setting in the File, Document Properties, Summary page.
Files must be Adobe Acrobat 5.0-compatible.
If you are using a later version of Adobe Acrobat, select File (or Document
depending on the version of Adobe), Reduce File Size and select the Acrobat 5.0
and later value in the Make Compatible with: option.
Files must have form fields for the placement of application data, with each field
tag being unique.
If no form fields exist, use the Adobe Professional version to add field tags. If
duplicate tags or non unique tags are in forms obtained from third parties, use
Adobe Professional to update the tags.
Files should not have embedded java script.
BI Publisher removes it during the course of the Map Enablement function when
the Generate button on the Reporting Tools, BI Publisher, Report Definition,
Template page is selected.
BI Publisher Security
Activity
Security
Settings
Query-based
reports
(Non-Bursted)
Query-based
reports
(Bursted)
Non-Querybased reports
(Non-Bursted)
Non-Querybased reports
(Bursted)
Running
Reports
Query Security X
NA
NA
Running
Reports
Application
Security
Running
Reports
Process
Scheduler
Security
Report
Viewing Report
Definition,
Definitions
Security page
Report
Viewing Report
Definition,
Definitions
Bursting page
NA
NA