Understanding How to Post Non-Process Scheduler Reports to the Report Repository

The process of posting reports and files to the Report Repository is performed by the Distribution Agent server. When using PeopleSoft Process Scheduler, the transfer is triggered by the Process Scheduler server when it detects that a process request, such as SQR has generated a report and is ready to be posted.

Reports that were generated outside of the PeopleSoft Process Scheduler either by being run manually or by a third-party scheduler, can be posted to the Report Repository using the PostReport PeopleCode class object. The PostReport PeopleCode class updates the Report Manager with the information for the new report, including the list of users and roles authorized to view the report. The request is sent to the Distribution Agent that is identified by the ServerName of the process scheduler server specified in the request.

The following is an example of the code:

Local PostReport  &RPTINFO;
/********************************************************
* Construct a PostReport Object.                        *
*********************************************************
&RPTINFO = SetPostReport();
&RPTINFO.ProcessInstance = 0;

/********************************************************
* Information to be displayed in the Report Manager     *
*********************************************************
&RPTINFO.ProcessName = "XRFWIN"
&RPTINFO.ProcessType = "SQR Report"
&RPTINFO.SourceReportPath = "\\server9000\report\sqr_xrfwin"
&RPTINFO.OutDestFormat = "PDF"
&RPTINFO.ReportFolder = "SQR Reports"

/********************************************************
* Description to be displayed in the Report Manager     *
*********************************************************
&RPTINFO.ReportDescr = "New SQR Report"

/********************************************************
* The server name of the Process Scheduler where the
* Distribution Agent assigned to post the request 
* resides.*
*********************************************************
&RPTINFO.ServerName = "PSNT"

/********************************************************
* List of users/roles authorized to view the report.    *
*********************************************************
&RPTINFO.AddDistributionOption("ROLE", "Managers");
&RPTINFO.AddDistributionOption("USER", "VP1");

&RPTINFO.Put();
&RPTINSTANCE =&RPTINFO.ReportId;