Showing posts with label excel. Show all posts
Showing posts with label excel. Show all posts

How to correctly generate BI/XML publisher Excel output from RTF template

While ago I had a issue where BI publisher which was not correctly generating Excel output format file. This particular problem happened with delivered report, SSR_TSRPT which is the Transcript Report in campus solutions. We have customised the delivered report by adding our own version of template file to the report definition. The Template File is of RTF format and the report output was defaulted to XLS format type.


The problem was it generated the report in Excel format and it was generating the file in .xlsx format and the RTF to Excel conversion was not happy with the new format. Bit of dig around and I found out that due to the new PeopleSoft PeopleTools 8.53 upgrade for the BI Publisher, PeopleSoft has added new configurations to the PeopleTools settings to control report attributes that are specific to PeopleSoft implementation of BI Publisher. The specific property is “psxp_excel_outputformat”. According to PeopleBooks;

So to make it compatible with older versions of Excel and to generate the output correctly, I modified properties of the report by changing psxp_excel_outputformat to XLS-MHTML format as described above, the changes are imposed in report level as follows;

How to Get Query String Values from PeopleCode

How to Get Query String Values from PeopleCode
In PeopleCode if you want to get the value from the Query String URL, the Request Class can be used. As you may know QueryString can be used to pass information from one page to another page (In the same component or a different component in the portal). Query string consists of the form of name-value pairs, such as EMPLID (name) = 12345678 (value). PeopleCode defines three methods to access the Query string parameter information.
  • GetParameter(name) - returns the value of a specified query string parameter or posted form data parameter.
  • GetParameterNames - returns all the parameter names for this request as an array of Strings, or an empty array if there are no input parameters
  • GetParameterValues(name) - method returns the values of the specified parameter (name) as an array of Strings, or an empty array if the named parameter does not exist. 

    as an example we can get the value of the EMPLID parameter from the query string as follows (assume that code is written in RowInit)

    Local string stringEMPLID = %Request.GetParameter("EMPLID");

    if EMPLID parameter returns multiple values then GetParameterValues() can be used as follows;

    Local Array of String &MYQueryParamValues;
    &MYQueryParamValues = GetParameterValues("EMPLID');
    for &i=1 to &MYQueryParamValues.Len Step 1
    Winmessage(&MYQueryParamValues[&i]);
    end-for;

    For more info please refer: http://docs.oracle.com/cd/E28394_01/pt852pbh1/eng/psbooks/tpcr/book.htm?File=tpcr/htm/tpcr23.htm#H4027