This chapter discusses how to:
Create data sources.
Register data sources.
This section provides an overview of data generation and creating schema and sample data.
In XML Publisher, the data extraction is separate for the data presentation. Sample data can be used to design your RTF template. Data schema is important for defining the bursting feature and helpful when designing RTF templates. If PeopleSoft queries are used for data extraction, the system will generate the schema, for all other data sources, you must create the data schema using tools outside of the PeopleSoft system.
XMLP can register PS/Query, Rowset object, XMLDoc object and XML file as a data source, but XML data can be generated using any means including PS/Query, SQR, Application Engine, PeopleCode, FileLayout and so forth. If you are not using PS/Query, Rowset or XMLDoc, you can use XML File as a data source for all other means of data generation. Internally all data source types will be converted to xml files before passing them to the core formatting engine.
Considerations for data generation include:
XML file is the preferred data source type for large reports such as Paychecks. Rowsets and XMLDoc data sources have performance/memory limitations, use them only on small reports.
For a large data source, consider defining bursting fields in your XML data so they can be used at runtime to split report processing; this will reduce memory usage and improve performance for large data files (burst by field tag must be from a second level repeating group (node) in the XML schema).
For RTF template based reports, design your data source xml structure to be as close as possible to the actual report template structure; this will improve runtime performance by preventing unnecessary grouping by the formatting engine.
Note. For improved performance, Rowset and XMLDoc data sources should only be used for small low volume reports; moderate to large reports should use XML files as their data sources.
Since the data source can be any xml data source, you will need to create the data schema to describe the xml data source. Sample data source information needs to be created to assist you in developing your report templates.
Storing the sample data file in PeopleTools provides a means to:
Perform iterative template development.
Preview the template.
XML Publisher expects XML data file to consist of a root node with a set of related elements below. This is a sample XML File used as a data source:
Sample XML <?xml version="1.0" encoding="UTF-8"?> <root> <taxroot> <Box_Year>2005</Box_Year> <Box_Form>W2</Box_Form> <EE_SSN>111-11-1111</EE_SSN> <ER_EIN>ER_111111111</ER_EIN> <Employee> <EE_FirstName>Incheol</EE_FirstName> <EE_LastName>Kang</EE_LastName> <EE_Address1>500 Oracle Parkway</EE_Address1> <EE_Address2>Redwood Shores</EE_Address2> <EE_Address3>CA 94065</EE_Address3> </Employee> <Employer> <ER_Name>Oracle USA</ER_Name> <ER_Address1>500 Oracle Parkway</ER_Address1> <ER_Address2>Redwood Shores</ER_Address2> <ER_Address3>CA 94065</ER_Address3> </Employer> <Tax> <Fed_Wages_COR>20000</Fed_Wages_COR> <Fed_Tax_COR>20000</Fed_Tax_COR> <RETIRE_EE_PRV>Y</RETIRE_EE_PRV> </Tax> </taxroot> <taxroot> <Box_Year>2005</Box_Year> <Box_Form>W2</Box_Form> <EE_SSN>2222-22-2222</EE_SSN> <ER_EIN>ER_222222222</ER_EIN> <Employee> <EE_FirstName>Chang</EE_FirstName> <EE_LastName>Yu</EE_LastName> <EE_Address1>500 Oracle Parkway</EE_Address1> <EE_Address2>Redwood Shores</EE_Address2> <EE_Address3>CA 94065</EE_Address3> </Employee> <Employer> <ER_Name>Oracle USA</ER_Name> <ER_Address1>500 Oracle Parkway</ER_Address1> <ER_Address2>Redwood Shores</ER_Address2> <ER_Address3>CA 94065</ER_Address3> </Employer> <Tax> <Fed_Wages_COR>10000</Fed_Wages_COR> <Fed_Tax_COR>10000</Fed_Tax_COR> <RETIRE_EE_PRV>Y</RETIRE_EE_PRV> </Tax> </taxroot> </root>
This is the sample schema for the xml file above:
<?xml version="1.0"?> <xs:schema id="root" targetNamespace="http://tempuri.org/example_xml.xsd" xmlns:mstns="http://tempuri.org/example_xml.xsd" xmlns="http://tempuri.org/example_xml.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified" elementFormDefault="qualified"> <xs:element name="root" msdata:IsDataSet="true" msdata:EnforceConstraints="False"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="taxroot"> <xs:complexType> <xs:sequence> <xs:element name="Box_Year" type="xs:string" minOccurs="0" /> <xs:element name="Box_Form" type="xs:string" minOccurs="0" /> <xs:element name="EE_SSN" type="xs:string" minOccurs="0" /> <xs:element name="ER_EIN" type="xs:string" minOccurs="0" /> <xs:element name="Employee" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="EE_FirstName" type="xs:string" minOccurs="0" /> <xs:element name="EE_LastName" type="xs:string" minOccurs="0" /> <xs:element name="EE_Address1" type="xs:string" minOccurs="0" /> <xs:element name="EE_Address2" type="xs:string" minOccurs="0" /> <xs:element name="EE_Address3" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Employer" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="ER_Name" type="xs:string" minOccurs="0" /> <xs:element name="ER_Address1" type="xs:string" minOccurs="0" /> <xs:element name="ER_Address2" type="xs:string" minOccurs="0" /> <xs:element name="ER_Address3" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Tax" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="Fed_Wages_COR" type="xs:string" minOccurs="0" /> <xs:element name="Fed_Tax_COR" type="xs:string" minOccurs="0" /> <xs:element name="RETIRE_EE_PRV" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Note. Schema and sample data are generated for PeopleSoft Query data source.
This section provides an overview of data source registration and discusses how to register data sources.
A data source registers the schema and sample data design files. It is the extracted application fields from the data source files that are placed into the template files to create the final report.
Data source may be PeopleSoft Query, Rowset object, XMLDoc object , or XML files.
Benefits of data source registration include:
Previously registered data sources can be reused with multiple report definitions.
The ability to take advantage of built-in bursting features.
A schema file must be registered with the report definition's data source in order to take advantage of bursting functionality.
Note. When creating a report definition, you can select a PeopleSoft Query data source that has not yet been registered and that data source is registered automatically once the report definition is saved. However, all other types of data sources must be registered before they can be associated with a report definition.
Note. You can check the format of an XML output file by opening it using Microsoft Internet Explorer (IE). IE opens the file and alerts you to any problems, such as unclosed tags.
Page Name |
Object Name |
Navigation |
Usage |
Data Source |
PSXPDATASRC |
Reporting Tools, XML Publisher, Data Source |
Register existing processes that supply XML data for reports. Register optional schema and sample data files for XML Publisher data sources. |
Access the Data Source page.
Data Source Type |
Select PSQuery, Rowset, XML Doc, or XML File. |
Data Source ID |
Select or enter the data source ID. When adding a new data source, for PSQuery data source types, the corresponding data source ID listing is pulled from Query Manager. For other data source types, this field accepts free-form text entry. Enter an ID that indicates what the data is, because you want to easily identify your data sources when defining reports. |
Description |
(Optional) Enter descriptive text that provides more detail about the data source. The description automatically defaults to the data source ID. |
Object Owner ID |
(Optional) Indicate which product, feature, or application owns this data source. This field is used to extract and package production data source and report registrations and their supporting files. |
Registered Date/Time |
This is a read-only field maintained by the system that indicates the date that the initial data source registration was made. |
Last Update Date/Time |
This is a read-only field maintained by the system that indicates the date that the last update to the data source was made. |
Active |
Select to indicate that this is an active data source. Only active data sources can be chosen when creating a new report definition. Only reports with active data sources can be processed. |
Registered By |
This is a read-only field maintained by the system that indicates the user ID of the operator who initially registered the data source. |
Updated By |
This is a read-only field maintained by the system that indicates the user ID of the operator who last updated the data source. |
These optional files facilitate the mapping of application data elements into the template file.
The sample data file is an XML file with sample data that is used for the preview action from within a desktop template designer or from within the report definition page. This file can be system-generated when PeopleSoft Query is the data source by clicking the Generate link; however, it must be constructed by the application developer and uploaded for non-query data sources.
The schema file is an XSD file that defines the structure and elements that is in the extracted XML data. The schema is required to map elements to a PDF form template and to insert form field tags into RTF templates using Microsoft Word. It is also required for bursting functionality. This file can also be system-generated when PeopleSoft Query is the data source by clicking the Generate link; non-query data sources must upload the file.
This table lists the role of each related file with regard to each of the template types:
Related File |
RTF Template |
PDF Template |
eText Template |
XSL Template |
Schema File |
Form Field Tag Insertion |
Mapping |
N/A |
N/A |
Sample Data File |
Form Field Tag Insertion, Preview |
Preview |
Preview |
Preview |
File |
(Optional) Click the file name links to view the XML and XSD files once you have generated, regenerated, or uploaded them. |
Last Update Date/Time |
(Optional) This is a read-only field maintained by the system that indicates the date that the last update to the related file was made. |
Generate/Regenerate |
(Optional) Click the Generate link for PeopleSoft Query data sources to generate the related sample data and schema files. Once the related files have been initially generated for query data sources, click the Regenerate link to regenerate them in the event the underlying query has changed. |
Upload |
(Optional) Click the Upload link for non-query data sources to bring the related sample data and schema files into the database. Note. A validation is run against the schema XSD file uploaded to a data source, alerting the developer if there are problems utilizing their schema. |