REN and the Art of One Click Reporting
Give your users one click access to reports.
Posted on 11/1/2006 (originally published in print on 12/1/2004)
by Shannon Whitley

When writing about PeopleSoft, I sometimes feel like the lone X-Wing commander in the original Star Wars movie. Hunched over my PC in a cube not much bigger than the rebel spacecraft's cockpit, I'm working on the latest PeopleSoft reporting technology and muttering, "Almost there..." Just like that movie character, my intended destination seems just out of reach.
Running reports from PeopleSoft can be a tedious job. First, you navigate to the run control page. If you aren't using an existing run control id, then you have to add a new one. When you get to the run control page, you specify the report parameters, click the "run" button, and configure your process scheduler output settings. Finally, you click on "ok" to run the report. You then have to navigate to Process Monitor or Report Manager to pickup the output.
The paragraph above is lengthy because producing a simple report in PeopleSoft takes too many steps. Using the information in this article, you'll be able to condense all those steps and produce instructions that look like the following sentence:
Click on the report link and wait for the output to appear in a new browser window.
Now and REN
Single-click reporting is possible with the introduction of the REN server. REN is an acronym for "Real-time Event Notification." Although the REN server has multiple uses, and it is a key part of PeopleSoft's MultiChannel Framework (MCF), this article will only discuss its use with Process Scheduler and reporting.
The REN server is configured when you setup your application server. I configured my REN server using the default settings, specifying my site's authentication domain. If you're not using an authentication domain, I'll discuss this a little further in the following paragraphs.
One of the most important things to consider when deciding to use REN with Process Scheduler is that you have to run PIA using your domain name in the URL. For example, if my users previously accessed our PeopleSoft application at http://ps , they now use http://ps.mydomain.com. During my last PeopleTools upgrade, I added my domain name to the PeopleSoft URL by enabling the Authentication Domain option. When I installed PIA, the setup program allowed me to specify an authentication domain. This corresponds to the internal ".com" name of my network.
Figure 1
Using an authentication domain can cause unforeseen complications. At many sites, your network folks may have already handled this, but we encountered some issues with integrating PeopleSoft and our existing internet portal. The browser sees the new URL as an internet location and has problems writing cookies. Employees were still accessing the internet site without the domain name at http://portal_dns. As a work-around, we had to open PeopleSoft in a new window whenever we link to PeopleSoft content.
There are ways to handle this and it's best to have a discussion with your network team before proceeding any further. We are still in the process of defining our authentication domain as an internal site, but at least we have a plan to address this issue.
Enabling REN
REN is an application server process whose default port setting is 7180. In the psadmin tool, you can change the port and specify your authentication domain. I recommend using the default port setting if possible. When you create the application server components you'll need to answer 'y' to the question regarding enabling the REN server.
REN can be further configured online via PeopleTools, REN Server Configuration. This is the area where you can setup additional clustering for your REN server if needed.
Figure 2
I went with the default configuration of a single REN server. I am running the REN server on my application server box and do not have any plans for clustering at this time. For further information on REN setup, read the installation guide or check in the PeopleBooks for PeopleSoft MultiChannel Framework.
Process Scheduler
Once the REN server is up and running, a new output option will become available for most report types. You can select a report to run to "Window," instead of Web, E-mail, File, etc. When you select "Window" and run the report, a new window will appear and the process status of the report will be displayed in that window. (See Figure 1) As the report moves from one status to the next, the window will be updated appropriately. When the report is finished, the report itself will open in a browser window.
Security will need to be setup for the REN server. In order to access the pages for the "Window" output type, the user must have a permission list with the appropriate rights. In the permission list setup, on the PeopleTools tab, click on Realtime Event Notification Permissions and grant "Full Access" to "Reporting Window." There is also an IScript called WEBLIB_RPT and "Full Access" should be granted to this as well.
Once you are able to manually select "Window" as an output type and successfully run a report from a normal run control page, you're ready for the real fun of single-click reporting.
Single-click Reporting
To demonstrate the fundamentals of running a report, I setup an example "Home" page in my test system. One of the links on my home page runs the SysAudit SQR report. From the home page, the user will simply click on the link and the report will run right before their eyes. No setting up run controls and selecting Process Scheduler options; no looking in Process Monitor or Report Manager for the output.
First, I created a page called Z_HOME and added a single hyperlink object. The record and field for the link are DERIVED_AE.FUNCTEST_BTN. The Destination of the button is "PeopleCode Command" and the label is "Run SysAudit". (See Figure 2)
I saved the page and then created a new component called Z_HOME. I added the page to the component and used INSTALLATION as the search record before saving the component. I attached the component to the existing menu called PT_REN and then registered the component in my portal.
After performing the usual tasks to create a new page, I re-opened the component and opened the editor for the Component PeopleCode. I then added the PeopleCode in Listing 1. The PeopleCode sets up the data needed in the run control record and either inserts a new row or updates the data on the run control record. Then, a ProcessRequest object is used to schedule the SysAudit report. The key to running the process through REN is the OutDestType. Notice that it is set to "Window."
Several run control fields were updated in the code. I made this demonstration easy by hard-coding the necessary run control values, but they could have come from derived work fields on the "Home" page. With the PeopleCode in place, I navigated to the page. I didn't have to select a run control id. I clicked on the hyperlink and up popped my reporting window. When the report completed, the PDF output opened without navigating to any other location in PeopleSoft.
Listing 1
Local ProcessRequest &RQST;
/* Update the Run Control Record */
&Rec = CreateRecord(Record.RUN_CNTL_SYSAUD);
/* OPRID not used on this record */
/* &Rec.OPRID.Value = %OperatorId; */
&RUN_CNTL_ID = "RUN";
&DTTM_STAMP = %Date;
&AUDIT_SW = "1111111111111111";
&Rec.RUN_CNTL_ID.Value = &RUN_CNTL_ID;
&Rec.SelectByKey();
If None(&Rec.RUN_CNTL_ID.Value) Then
&SQL_INS = CreateSQL("%Insert(:1)");
&Rec.RUN_CNTL_ID.Value = &RUN_CNTL_ID;
&Rec.DTTM_STAMP.Value = &DTTM_STAMP;
&Rec.AUDIT_SW.Value = &AUDIT_SW;
&SQL_INS.Execute(&Rec);
&SQL_INS.Close();
Else
&SQL_UP = CreateSQL("%Update(:1)");
&Rec.DTTM_STAMP.Value = &DTTM_STAMP;
&Rec.AUDIT_SW.Value = &AUDIT_SW;
&SQL_UP.Execute(&Rec);
&SQL_UP.Close();
End-If;
/* Create the ProcessRequest Object */
&RQST = CreateProcessRequest();
/* Set all the Required Properties */
&RQST.RunControlID = &RUN_CNTL_ID;
&RQST.ProcessType = "SQR Report";
&RQST.ProcessName = "SYSAUDIT";
&RQST.RunDateTime = %Datetime;
/* Utilizing REN Server */
&RQST.OutDestType = "Window";
/* Schedule the Process */
&RQST.Schedule();
End User Accolades
With Single-click reporting, your users can avoid Run Control Hell. They also don't have to go hunting for their reports in multiple locations. Yes, there is a little extra work involved to set all of this up. I've found that the extra effort is well worth it. Too many times I've created excellent reports, only to find my users aren't printing them because they take too many steps to run. Single-click reporting with the REN server makes running those reports a snap.