Professional Documents
Culture Documents
More flexibility
Data Logic
Reduced maintenance
Microsoft Word
Adobe Acrobat
PDF RTF with Plug-in
Template Manager
Template
<PayChecks>
<PayCheck> Bursting by EMPLID
<EmpId>1000</Empld>
<DeptId>01</DeptId>
<Salary>1000</Salary>
</PayCheck>
<PayCheck>
<EmpId>1001</Empld>
<DeptId>01</DeptId>
<Salary>1000</Salary> 1000 1001 1002
</PayCheck>
<PayCheck>
<EmpId>1002</Empld>
<DeptId>02</DeptId> Bursting by DeptID
<Salary>1000</Salary>
</PayCheck>
</PayChecks>
EmpID:
1000 EmpID:
1001 1002
DeptID: 01 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
Creating and Registering Data Sources
PS/Query PS/Query
Application
Engine
Extract
Database SQR
Data
PeopleCode
Data Source
PS/Query XMLP
Internally
Rowset converted formatting engine
XMLDoc
Performance Considerations
Lower Performance
PeopleCode
XML File XMLDoc Rowset
string
PeopleCode
XML File XMLDoc
string
PeopleCode
XML File
string
XML File
PS Query
In this demo, we will create a new public query for course listings, name the
query XMLP_TEST.
Use the following information to create the query:
Labels Labels
XML File
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
Rowset
Rowset
Row
Fields
Row
Rowset Sample Data XML File
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 the Register Data Source page with PS Query data source to:
Generate the sample data file.
Download the sample data file to facilitate RTF template creation.
Reporting Tools, XML Publisher, Data Source, Add a New Value
Default Data
Source Type
Select existing
query
Generate Sample Data and Schema
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
Upload links
Demo: Creating Data Sources
When the sample data has been loaded, you will not see the data
displayed until you select one of the Insert options.
The plug-in provides the ability to insert data fields into your document .
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 .
Field Dialog Box
Table
Form
Freeform
Smith
John
(123) 456-7890
Step 2: Select Report Data
:
Select the data fields that will be shown in your report
Step 4: Group Report
In this step, you can group the report by selected data fields.
Grouping Layout Options
Group Left
Grouping
Header 1 Header 2 Header 3 Header 4 Header 5
Field
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
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?>
<?template:header?>
XMLP Training
<?end template?>
<?template:address?>
Pleasanton Campus
500 Oracle Lane
Pleasanton, CA 94488
<?end template?>
Importing Sub-Template
Define sub-template
<?template:header?>
XMLP Training
<?end template?>
Define sub-template in
Sub1.rtf Content Library
Import sub-template
into a template
<?import:psxmlp://TRAINING?>
<?call-template:header?>
Importing Sub-Template
<?import:psxmlp://sub-template_NAME?>
Where sub-template_NAME is the registered sub-template ID in the
Content Library
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
<?call-template:template_name?>
Example:
Passing Parameters
Declaration in
primary template
<xsl:param name="ReportID"
xdofo:ctx="begin"/>
Demo: Adding a Sub-Template
In this activity, we will create a sub-template and use it in our student letter.
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
Forms Toolsbar
Form Field
PDF Guidelines
In this demo, we will convert an RTF template to PDF and add the form
fields.
Review
Page Description
Output Identifies the output options that will be available when the
reports is run.
Security Identifies by role or user ID who can view the report once
it has been run.
web posting,
printer, fax
At lease one template must Use this button to upload an The preview button uses
be active in order to save a existing template the sample xml data file
report definition to generate report output
Output Page
PDF pdf
Etext txt
If you create PDF and name tags that are the same to begin with in your
PDF file, no mapping is necessary.
The map file should have a name that distinguishes it from the
unmapped file.
For example, the template file XRFWIN.pdf would have a map file
XRFWINm.pdf.
Generating Map File
In this demo, we will create a report definition using a PDF template for
student certificates.
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">
NAM01
<BU>NAM01</BU>
<LOC>PHI</LOC>
</row>
<row rownumber="3">
<BU>NAM02</>
<LOC>ATL</LOC>
</row>
NAM02
Bursting Page
Template or
translation for
each burst file
assigned at
runtime
Report file
security
assigned at
runtime
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
<?xml version="1.0"?>
<xs:schema id="STUDENT" targetNamespace="http://tempuri.org/STUDENT.xsd
xmlns="http://tempuri.org/STUDENT.xsd" xmlns:xs="http://www.w3.org/2001/
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="STUDENT" msdata:IsDataSet="true" msdata:
<xs:complexType>
<xs:choice maxOccurs="unbounded"> Highest level
<xs:element name="PSU_STUDENT_TBL">
repeating node
<xs:complexType>
<xs:sequence>
Fields <xs:element name="STUDENT_ID" type="xs:string" minOccurs="0" />
available <xs:element name="STUDENT_NAME" type="xs:string" minOccurs="0" />
to Burst <xs:element name="CUSTOMER_ID" type="xs:string" minOccurs="0" />
By <xs:element name="PSU_STUDENT_EXP" minOccurs="0" maxOccurs
<xs:complexType>
<xs:sequence>
<xs:element name="STUDENT_ID" type="xs:string" minOccurs="0" />
<xs:element name="SKILL" type="xs:string" minOccurs="0" />
Template
This feature dynamically drives the template assignment at runtime based
upon the data value of a designated schema tag.
Field Description
Runtime parameters
Demo: Registering Sub-Template
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
XLIFF de
XLIFF es
XLIFF jp
Translation Components
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
Allow viewer
ID assignment
at report run
time
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:
Burst by field
Additional
Search
fields
Report Manager
In Report Manager, you can also search for reports using filters.
Reporting Tools, Report Manager
Demo: Running Query Reports
PSXP_XMLGEN
Prepare Data
(XML Generation Classes)
PSXP_RPTDEFNMANAGER
(Report Definition Manager Classes)
Generate and Route
Reports
PSXP_ENGINE
(Engine Classes)
import PSXP_RPTDEFNMANAGER:*;
import PSXP_REPORTMGR:*;
import PSXP_XMLGEN:*;
import 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
import PSXP_RPTDEFNMANAGER:*;
&rptDefn.SetRuntimeDataXMLDoc(&xmlDoc);
Report definitions that use a data source other than a PeopleSoft query
must set the data source before generating the report using the
ProcessReport method.
Depending on your data source, you can use one of the following
methods to specify the data:
PSQuery SetPSQueryPromptRecord(&Record)
You can use quotes to take the default value from the report definition.
Publish
For example:
You can display a report online using the DisplayOutput method, commit
prior to issuing the DisplayOutput.
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.
Example: Application Engine Program to Run XML
Publisher Report
%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
Example: Application Engine Program to Run XML
Publisher Report
/* process report */
&oRptDefn.ProcessReport("", PT_XRFWIN_AET.LANGUAGE_CD,
%Date, &oRptDefn.GetOutDestFormatString(%OutDestFormat));
XML Publisher
Process name is same as application
engine program name
Creating File Layouts
The application engine program can create the XML file and then publish
an XMLP report using that data source:
File Layout
Output format XML file
PeopleCode to publish
report based on XML File
data source
Methods to Write to Files
The File Class contains methods to write to files defined by a file layout
definition:
WriteRecord(record)
WriteRowset(rowset)
PeopleCode to Write XML File