Saturday, May 31, 2008

App Engine running XML Publisher with PS Query Data Source

Haven't you notice that every posts up to this point are XML Publisher related? I just can get enough of this tools, i like discovering what this tool can do for me as a developer. If using Rowset Data Source in XMLP was too complicated for you, try using the PS Query as the Data Source. You don't need to create a code for sample data file and schema file because you can generate those files within PeopleSoft. Just replace the Rowset code in the XML Publisher Part 2 with this code;

/*fill prompt record*/
&rcdQryPrompts = &ReportDef.GetPSQueryPromptRecord();
If Not &
rcdQryPrompts = Null Then
If Not Prompt(&ReportDef.GetDataSource().Name, "",
&rcdQryPrompts) Then
Exit;
End-If;
&ReportDef.ProcessReport(&sTemplateId, %Language_User, %Date, &sOutputFormat);
End-If;

3 comments:

Anonymous said...

Hi there,

That was really great.. till now, i have only i used peoplesoft query as data source. Could you please help me on how to crate a run control page for xml publisher with run control parameters?.. how do we pass parameters to the xmlp report?.. is it possible for a query report.. if not, how should i go abt it.. YOur help would be greatly appreciated. htanks in advance!

Anonymous said...

This example code was done using App Engine(AE). Let's not complicate things, first, lets forget XMLP for a while. Create your AE program, process your data, and put all processed data into your custom table(s). Second, create a query using that custom table. Now, in your AE program, add peoplecode action (make sure this action is the very last of AE), then add the code from http://psofttechguy.blogspot.com/2008/05/xml-publisher-part-2.html as your template, delete the following section of the code (/*Create Rowset*/, /*Fill Rowset*/, /*Create Schema*/, /*Create Sample XML File*/) and replace them with the code above.

whoami said...

I created my ps query with a prompt, but it says my rcdQryPrompts is null. Have you seen that before?

&rcdQryPrompts = &ReportDef.GetPSQueryPromptRecord();