Archive for July, 2008

eText, and XSL Templates for XML Publisher do not work in PeopleTools 8.49

This title really says the most important part.  The rest of this is a rant–I have no work around for making this work at the moment.

Back in May Human Resources aproached me, asking for help developing a flat file for uploading our retirement data with TIA/Cref.  Since I have taken this job as an Information Systems Developer, newly exposed to Oracle and PeopleSoft to a level I had not previously been exposed I have heard about this XML Publisher thing.  It’s supposed to replace crystal reports, which are old and gross (yet, seem to work).  Being a web dude, I love XML.  I’m all about it.  So clearly, me and XML Publisher seem like a match.

XML Publisher supports 4 template formats.  These are: Rich Text Format (RTF), eText Format (also RTF), PDF (Built using word in the RTF format), and miraculously enough Extensible Stylesheet Language Transformations (XSLT).  Personally, I was quite pleased that Oracle had embraced a web standard created by the World Wide Web Consortium.  As a bonus, I had used this technology previously, and while wordy, I had found it excellent for translating XML.

I tried creating a simple XSL Template.  Unfortunately, it did not work.  It was at this time that I created my first support ticket with Oracle.  Now, nearly 3 months later, my first support ticket is still open.

They told me that they didn’t really support, or have example XSL documents I could use.  I switched between XSLT to eText because, supposedly, eText worked and was supposed to do exactly this kind of thing.  It was also broken.

One thing that is cool about this is I think I was their first client that ever tried to use the XSL Template option.  That makes me a trail blazer, in a defunct kind of way.

XML Publisher For the Rest of Us

Today we went live with our first XML Publisher report. Seeing as MICA is possibly the only school running PeopleSoft Campus Solution 9.0 in a production environment, this is possibly the first XML Publisher report in this environment. This post will focus specifically on simple template creation.

There were a couple things that I found annoying about learning XML Publisher:

Our first XML Publisher report was a welcome letter to new people at our institution, which included their name, user name, and a randomly generated password. With this information people would be able login to their email, or use other institutional resources. Since we are a university we can get a mass of new users at the beginning of every semester. As a result we had these additional requirements:

We had written a PeopleSoft Query that would return our set of users, with the relevant data. The generated Sample XML Publisher XML File contained a couple fields:

In order to loop over each person in the RTF Template, I used this syntax in the word document:

<?for-each:row?>

Some repeating content.

<?end for-each?>

Please note, the ‘row’ is a reference to the XML generated by peoplesoft. No mention to the <query> element is necessary. The string after the colon is cAsE sEnSiTiVe, which is an undocumented bonus. You should be able to use ‘row’ for every PeopleSoft Query XML Publisher report. The case may be different based on your implementation however.

In order to sort the result set by last name, and then by first name, I added this syntax to the above code:

<?for-each:row?><?sort:LAST_NAME?><?sort:FIRST_NAME?>

Some repeating content.

<?end for-each?>

Again, LAST_NAME is cAsE sEnSiTiVe. You could continue to sort your data by adding more <?sort?> tags.

Finally, to output data from your XML file, you use this syntax:

<?for-each:row?><?sort:LAST_NAME?><?sort:FIRST_NAME?>

Dear <?DISPLAYNAME?>,

Some repeating content.

<?end for-each?>

This includes the data in the <DISPLAYNAME> tag in your XML document. You can include other attributes by using this syntax on other elements in your XML document.

I hope this helps the rest of you get through this a little faster then I did.