Running, Locating, and Viewing XML Publisher Reports

You can view and schedule query-based reports with XML Publisher. You can run custom reports as well as query-based reports batch through the Process Scheduler or online using PeopleCode APIs.

This chapter discusses how to:

Click to jump to parent topicRunning XML Publisher PeopleSoft Query Reports

You can view and schedule query-based reports with XML Publisher-delivered PeopleSoft Internet Architecture pages.

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicPages Used to Run XML Publisher PeopleSoft Query Reports

Page Name

Definition Name

Navigation

Usage

Query Report Viewer

PSXPQRYVIEWER

Reporting Tools, XML Publisher, Query Report Viewer

Run reports in Query Report Viewer.

Query Report Scheduler

PSXPQRYRUNCNTRL

Reporting Tools, XML Publisher, Query Report Scheduler

Select a run control ID and submit a process request to schedule query-based reports.

Click to jump to top of pageClick to jump to parent topicRunning Reports in Query Report Viewer

Access the Query Report Viewer page (Select Reporting Tools, XML Publisher, Query Report Viewer.)

The Query Report Viewer allows selection and online viewing of those reports that have a data source type of PeopleSoft Query. 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.

Show Template Prompts

Click to expand the Report Definition Search Results grid to include the template ID and as of date template prompts.

 

Report Name

Displays the name of the report.

Description

Displays the report's description.

 

Data Source ID

Displays the report's data source ID.

 

Template ID

Select from the templates associated with the report definition.

As Of Date

Select the as of date for the template version that you want to view.

Format

Select from the output format choices associated with the report definition.

Burst

Indicates whether the report definition includes bursting instructions.

Note. Bursted reports are listed, but you can't run them from the Query Report Viewer component. Bursted reports must be run from the Query Report Scheduler component.

View Report

Click to view the report online. When Query runtime parameters exist, the parameters are displayed.

A new window opens displaying the report results according to the runtime inputs. You can save the report results locally by using the browser's Save functionality.

Note. This link is disabled for bursted reports.

Note. The data and template translation language choice is automatically supplied to the user’s session language.

Click to jump to top of pageClick to jump to parent topicScheduling Reports in Query Report Scheduler

Access the Query Report Scheduler page (Select Reporting Tools, XML Publisher, Query Report Scheduler.)

Query Report Scheduler uses the existing Process Scheduler functionality to:

Note. If a query is run through Reporting Tools, Query, Schedule Query, the XML Publisher-related prompts do not appear. Only the basic table-formatted query results are generated.

Run Control ID

Enter a run control ID.

 

Language

Indicates the language of the run control.

The report selects data and template translations based upon the language code of the run control. The user sets this value on the My System Profile, General Profile Information page in the My Preferred Language for Reports and Email field. The language appears in the Query Report Scheduler Search Results so that you are informed of the language selection criteria.

Data Source Type

Select either Query or Connected Query.

Report Name

Select the name of the Query or Connected Query-based report that you want to schedule.

The drop-down list box values are based on previously registered report definitions. Existing Query security applies so that each user has access to run only reports to which they have Query access.

Burst Field Name

Displays the value set in the Burst by field of the Report Definition, Bursting page. This field appears for bursted reports only.

Dynamic Template

Displays either Active or Inactive, depending on whether criteria exists to dynamically select the template, language, or both based upon a data value that is set in the Template group box of the Report Definition, Bursting page. This field appears for bursted reports only.

Bursting Security

Displays either Active or Inactive, depending on whether criteria exists to assign unique bursting security that is set in the Burst Security group box of the Report Definition, Bursting page. This field appears for bursted reports only.

Template ID

Select from the templates associated with the report definition.

Template As Of Date

(Optional) Select the as of date for the template version to use for the report.

The system looks at the report definition for templates that are active as of this date.

Channel

Indicates the distribution channel of the template.

Update Parameters

Click to update the Query or Connected Query runtime prompt values.

After runtime values are entered, they are saved with the run control ID.

Report Manager

Click to go to the Report Manager to check the progress of your process request and to view the report content immediately after the output file is posted.

The final output file is posted to the Report Manager repository for web access by authorized users.

See Viewing Reports.

Process Monitor

Click to go to the Process Monitor to check the progress of your request.

See Using Process Monitor.

Run

Click to access the Process Scheduler Request page.

The Process Scheduler Request page enables you to specify variables, such as where a process runs and in what format the process output is generated.

The values for output type and output format appear by default per the report definition and can be changed if the report definition allows it. Distribution options are also active, allowing updates to viewers, only as allowed in the report definition.

Go to XMLP Report Search

Click to access the XMLP Report Search page.

See Searching the XML Publisher Report Repository.

See Submitting and Scheduling Process Requests.

Click to jump to parent topicRunning Reports in Process Scheduler

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicUsing the Process Scheduler Request Page

At runtime, the Process Schedule Request page appears after you click the Run button on the run control page. This page includes operator-selectable choices of output type and output format. Output type choices reflect the location values from the report definition. Output format choices reflect the output format values from the report definition.

Because values for output location, output format, and viewer security are associated with each report definition, these values should be passed to the Process Schedule Request page. These values are passed automatically only when the process definition type is XML Publisher.

Note. In order to execute XML Publisher reports with DB2 z/OS databases you will need to configure a Process Scheduler on a PeopleTools certified Windows or other UNIX batch server. The PeopleTools Process Scheduler on z/OS cannot execute XML Publisher reports.

Click to jump to top of pageClick to jump to parent topicCreating the Run Control Page

You need to create a custom run page that contains the prompts required by your report definition.

Your run control page should be a combination of the PeopleSoft PeopleTools-supplied run control subpage and the application-specific section for runtime parameters for the data extraction program. It should include report, template name, language, and as of date. Depending upon your application design, these values could be systematically deduced from user preferences, come from program defaults, or come from the operator input selection.

See Running Processes from PeopleSoft Applications.

Click to jump to top of pageClick to jump to parent topicCreating a Process Definition

A process type of XML Publisher is delivered as system data and is available on the PeopleTools, Process Scheduler, Process Definition page. When application processes are defined and assigned the XML Publisher process type, entries for output type and format on the runtime Process Scheduler Request page reflect the definitional metadata under the XML Publisher report definition.

The XML Publisher report name, Process Scheduler process name, and the Application Engine process name are the same.

See Defining Process Definitions.

Click to jump to top of pageClick to jump to parent topicMonitoring Requests

The Process Scheduler processes XML Publisher-based reports. You can define multiple related activities as separate processes. For example, generation of the XML data, the XML Publisher merging of that data with the template and creating the final output, and the subsequent postprocessing to send related emails. Each process appears separately in the Process Monitor. Error messages indicate whether the problem is on the data extraction or the XML Publisher portion of the report request.

Click to jump to parent topic Running Reports Using PeopleCode

This section provides an overview of PeopleCode XML Publisher classes and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding PeopleCode XML Publisher Classes

All report runtime functionality is available using the PeopleCode XML Publisher classes. The classes and methods that you use to define custom reports respect the report category security assigned to the report definition. Users with read-only access to report definitions cannot edit them.

Runtime classes are available to call and pass in XML data and a choice of report template to the XML Publisher core engine to generate the output in a desired format. For online viewing, a function is available to pass the output back to the browser. Processing a report through the Process Scheduler posts XML Publisher output entries to the web, the Report Manager, or both according to the existing processes. When processes are categorized under the XML Publisher process type, the capability to establish output destination, format, and authorized viewer choices from the related report definition is enhanced. A search method is also available for accessing reports in the report repository.

You can call the PeopleCode from a page for online processing, or you can create an application engine program to run the report in batch.

See Creating Report Definitions.

See Creating Application Engine Programs.

See XML Publisher Classes.

Click to jump to top of pageClick to jump to parent topicRunning Reports Using PeopleCode

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 are not built-in classes, like rowset, field, record, and so on. They are application classes. Before you can use these classes in your PeopleCode program, you must import them to your program.

Your import statements should look like this:

import PSXP_RPTDEFNMANAGER:*;

See ReportDefn Class Constructor.

Example: Publish a Report Based on PS Query

This is a code snippet example for publishing a report based on PS Query:

import PSXP_RPTDEFNMANAGER:*; /* get report definition object */ &oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn (&sRptDefn); &oRptDefn.Get(); /* fill query runtime prompt record */ &rcdQryPrompts = &oRptDefn.GetPSQueryPromptRecord(); If Not &rcdQryPrompts = Null Then &oRptDefn.SetPSQueryPromptRecord(&rcdQryPrompts); End-If; /*generate report*/ &oRptDefn.ProcessReport (&sTmpltID, &sLangCd, &AsOfDate, &sOutFormat); /*publish report */ &oRptDefn.Publish(&sPrcsServerName,"",&sFolder, &prcsInstId);

Example: Print a Report Based on XMLFile

This is a code snippet example for printing a report based on XMLFile:

import PSXP_RPTDEFNMANAGER:*; /* get report definition object */ &oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn (&sRptDefn); &oRptDefn.Get(); /* pass XMLFile to the report definition */ &oRptDefn.SetRuntimeDataXMLFile(&sXMLFilePath); /*generate report*/ &oRptDefn.ProcessReport (&sTmpltID, &sLangCd, &AsOfDate, &sOutFormat); /*print report */ &oRptDefn.PrintOutput(&sDestinationPath);

Click to jump to top of pageClick to jump to parent topicChoosing a Template

Because report definition information is available from the PeopleCode XML Publisher classes, you can incorporate prompts on runtime pages to select reports and templates. You must pass in XML data and a choice of report template to the XML Publisher core engine to generate the output in a desired format.

You can retrieve a particular template file or expose a choice of templates at runtime. Only active reports and templates are retrieved. An as of date is also required to coordinate with the template file’s effective date. If not supplied, the as of date is assumed to be the system date. At runtime, the template as of date is used to select the appropriate active effective-dated template and sub-template that is current as of that date.

A PeopleCode class is available to retrieve a report’s template IDs based on a channel value, although it is not exposed on a PeopleSoft PeopleTools-delivered Pure Internet Architecture page. You can also incorporate template administration functionality directly into your application pages. This functionality includes creating the definitions and storing the related files, as well as querying to find the templates associated with a report definition.

Click to jump to top of pageClick to jump to parent topicPassing Parameters

The system may need to pass runtime parameters into the XML Publisher core engine. Numbers and text are sent as strings with single quotes. By default, PeopleTools( through the RepoftDefn class ProcessReport method) always passes the following parameters/tags:

<?$ReportID?> <?$ReportTitle?> <?$RunDate?> <?$RunTime?>

These tags can be included in the template layout wherever they are needed, they are especially useful for report headers. Before inserting these parameters into the template (or sub-template), the following declarations must be entered under a form field at the top of the report's primary template; one for each parameter called:

<xsl:param name="ReportID" xdofo:ctx="begin"/> <xsl:param name="ReportTitle" xdofo:ctx="begin"/> <xsl:param name="RunDate" xdofo:ctx="begin"/> <xsl:param name="RunTime" xdofo:ctx="begin"/>

These tags can be included in the template layout wherever they are needed. These parameters are especially useful for report headers.

The PeopleSoft-delivered XML Publisher report XRFWIN demonstrates the usage of these values in a report calling a sub-template for a header.

For the standard parameter passage of report ID and report description, the translation of report descriptions may become important for report headers. XML Publisher includes PeopleSoft-related language tables for the data source, and report and template tables that support the report’s data language values for the description fields.

Click to jump to top of pageClick to jump to parent topicBursting Reports

The ReportDefn class ProcessReport method has code built in to process a single report request to create multiple output files per the bursting instructions defined on the report definition. Bursting always occurs at runtime if a burst value is stored in the report definition's burst field value.

See Setting Bursting Options.

Click to jump to top of pageClick to jump to parent topicCustomizing Printed Report Output

The PeopleSoft application supports batch printing XML Publisher reports directly from a server using PDF output format. Printers with Postscript level 3 interpreter natively support printing PDF format. You can also convert the generated PDF report files to conventional formats supported by other printers, such as Postscript or PCL, by using an external software program. The PeopleSoft application provides PeopleCode support for sending PDF files directly to a specified printer, and it also provides customization capability for inserting conversion logic from PDF to different printer formats.

To send an XML Publisher report to a printer, use the PrintOutput method after the ProcessReport method as shown in this example:

&MyReportDefn.ProcessReport("myTemplate", "", %Date, "PDF"); &MyReportDefn.PrintOutput(&PrinterPath);

If you want to insert conversion logic from PDF to a different printer format before an output file is sent to a printer, create a batch file named psxprint.bat on Microsoft Windows or psxprint.sh on Unix under the Process Scheduler server home directory %PS_HOME%\appserv\prcs\%domain_name% and write a call to an external conversion program in this batch file.

In the batch file, you can use the following variables, which the ReportDefn.PrintOutput() method replaces with actual data at report runtime:

Variable

Description

%RPTOUTDIR%

Full path to the report output directory.

%REPORTFILE%

Full path to the report output file.

%DESTPRINTER%

Full path to the destination printer.

See Setting Output Options.

Click to jump to top of pageClick to jump to parent topicDistributing Reports

PeopleCode options are available for posting your generated report to a file server, printing it, or publishing it to the Report Manager with appropriate security.

For online viewing, a method is available for passing the output back to the browser. No report results are persisted, but the user viewing the results can use the browser's Save As feature to retain the report file locally.

When the output type is Printer, the output format is limited to PDF. A printer location must be specified, and the printer must be capable of printing PDF output. If the output file is large, adequate memory must be available on the print server.

Distribute To IDs are those defined in the Report Definition, Security page. Distribution functionality within the Process Scheduler is enhanced to assign values systematically per the XML Publisher report definition. The Report Definition, Security page provides choices for selecting a Report Manager folder as well as the ability to assign viewing rights to additional roles or user IDs at runtime if allowed by the report definition.

When the report definition has the Allow viewer ID assignment at report runtime check box selected, the report requestor can add or delete IDs. If no viewers are assigned, by default the requestor’s ID is added systematically.

Click to jump to top of pageClick to jump to parent topicSearching for Reports

A search method is available for accessing reports in the Report Manager repository. The PeopleCode uses additional search keys based on the report definition’s additional metadata.

See Setting Bursting Options, Searching the XML Publisher Report Repository.

Click to jump to parent topicUsing Time Zones in XML Publisher Reports

When displaying datetime values, XML Publisher takes into consideration the time zone of the user running the report. The time zone is retrieved from the user's Personalization settings (My Personalizations, Regional Settings, Local Time Zone). Personalized time zone display is dependent on the following conditions:

Note. XML Publisher uses Java Time Zones based on the JRE running under the PeopleSoft application server. In some releases of JRE, a known issue exists in that Daylight Savings Time is calculated incorrectly for EST, MST, and HST timezones. This problem has been documented by Sun and a solution is available on their website: http://java.sun.com/developer/technicalArticles/Intl/alert.html

Click to jump to parent topicLocating and Viewing XML Publisher Reports

This section discusses how to search the XML Publisher report repository.

Click to jump to top of pageClick to jump to parent topicPages Used to Locate and View XML Publisher Reports

Page Name

Definition Name

Navigation

Usage

XMLP Report Search

PSXPRPTMGR

Reporting Tools, XML Publisher, XMLP Report Search

Search the XML Publisher Report Repository.

Click to jump to top of pageClick to jump to parent topicSearching the XML Publisher Report Repository

Access the XML Report Search page (Select Reporting Tools, XML Publisher, XMLP Report Search.)

Enter criteria to filter the reports to list. XML Publisher Report Search ignores criteria for fields that are blank.

Report Definition ID

(Optional) Select the name of the report definition to search on.

Folder Name

(Optional) Select a specific folder to list only the reports that are contained in that folder.

Created On

(Optional) Use the calendar, or enter a specific date to list only reports that are created on that date.

Instance and to

(Optional) Enter a range of process instances. Leave the to field blank to list all instances after the number that you enter in the Instance field.

Last

(Optional) Use to display only those reports that were created in the last number of days, hours, or minutes. For example, to list only those reports that were created within the last two hours, enter 2 and select Hours.

Report Manager

Click to go to the Report Manager.

See Using Report Manager.

Process Monitor

Click to go to the Process Monitor.

See Using Process Monitor.

See Viewing Reports.

Viewing Reports Using Additional Search Keys

Users can also search by the following criteria for bursted reports:

To view bursted reports using the additional search keys:

  1. Select the Case Sensitive check box to perform a case-sensitive search.

  2. For the Burst By field, select a search operator.

  3. Enter a value to search on.

  4. For the additional Search Key fields, select the search field name, search operator and search value.

See Setting Bursting Options.