1. Summary
This blog outlines the steps to implement enhanced reporting features in PeopleSoft.
2. Working with PDF Reporting Options in BI Publisher
The following BI Publisher features are available for PDF documents:
- Counting the number of pages in a PDF file
- Merging PDF files
2.1 Counting the Number of Pages in a PDF File
The Java object com.lowagie.text.pdf.PdfReader is used to determine the number of pages in a PDF file.
Sample Code:
Local JavaObject &obj_Split_PDF_Size = CreateJavaObject(“com.lowagie.text.pdf.PdfReader”, “”);
/* &NumberofPages – returns the number of pages in the PDF file */
Local number &NumberofPages = &obj_Split_PDF_Size.getNumberOfPages();
2.2 Merging PDF Files
The Application Package PSXP_ENGINE:PDFMerger can be used to merge two or more PDF files.
Sample Code:
&Reportmrg = create PSXP_ENGINE:PDFMerger();
&ret = &Reportmrg.mergePDFs(,
3. Working with RTF (Document) Reporting Options in BI Publisher
The following features are available for Oracle-PeopleSoft BI Publisher .rtf templates:
- Using barcodes in reports
- Dynamic/conditional watermarks
- Dynamic images in report output
- Headers and footers
3.1 Using Barcodes in Reports
To use barcodes in BI Publisher reports, follow these steps:
- Download the corresponding barcode font and install it on the local machine (C:\Windows\Fonts) and on the Application Server (/fonts/truetype/).
- Insert the field to be displayed as a barcode into the template and apply the barcode font to it.
- In File > Properties, go to the Custom tab and enter the following details:
-
- Name: xdo-font.
- Type: Text
- Value: truetype.
Setting this property ensures the barcode is visible in the PDF output.
3.2 Dynamic Headers and Footers
Form fields cannot be inserted directly into the header or footer of .rtf templates in BI Publisher. To include dynamic or conditional content in these sections, XML tags must be written directly into the header or footer. These tags are replaced with actual values during report generation.
Example:
<?fld_DESCR?>
3.3 Dynamic/Conditional Watermark
To add a dynamic or conditional watermark in an .rtf template:
- Navigate to Format > Background > Printed Watermark in the template.
- Enter the conditional expression in the text field.
Example:
<?xdoxslt:ifelse(<condition>, ‘Watermark to be displayed when the condition is satisfied’, ‘Watermark to be displayed when the condition is not satisfied’)?>
This will ensure that the watermark content changes dynamically based on the specified condition.

3.4 Dynamic Images in Report Output
To include dynamic images in a BI Publisher report, follow these steps:
- The dynamic image can be in any of the following formats: JPEG, BMP, GIF, or PNG.
- Store the path of the dynamic image in a record field that is included in the report’s data source.
- Insert a dummy image into the .rtf template.
- Double-click the image, go to the Web tab, and enter the dynamic value in the Alternative Text field using the following format:
Example: url:{.//}
- Use the following path conventions:
-
- // → For level 0 records
- .// → For level 1 or nested records
Here, refers to the record field that holds the image path used in the report.

4. Working with Excel Reporting Options in BI Publisher
The following feature is available in Oracle-PeopleSoft BI Publisher Excel templates:
- Multi-sheet Excel reports using the Excel object
4.1 Multi-Sheet Excel Report – Using the Excel COM Object
You can generate multi-sheet Excel reports using the Excel COM object in PeopleCode. Below is a sample PeopleCode snippet to demonstrate the process:
&oWorkApp = CreateObject(“COM”, “Excel.Application”);
&oWorkApp.DisplayAlerts = False;
/* Make the Excel application visible */
ObjectSetProperty(&oWorkApp, “Visible”, True);
/* Add a new workbook */
&oWorkBook = ObjectGetProperty(&oWorkApp, “Workbooks”);
&oWorkBook.Add();
/* Access and rename the first worksheet */
&oWorkSheet = &oWorkApp.Worksheets(“Sheet1”);
&oWorkSheet.Name = “Test Sheet”;
/* Set a value in cell A1 of the first worksheet */
&oWorkSheet.Cells(1, 1).Value = “Test”;
/* Access and rename the second worksheet */
&oWorkSheet = &oWorkApp.Worksheets(“Sheet2”);
&oWorkSheet.Name = “Access”;
/* Delete the third worksheet */
&oWorkSheet = &oWorkApp.Worksheets(“Sheet3”);
&oWorkSheet.Delete();
/* Save the workbook to the specified path */
&oWorkApp.ActiveWorkbook.SaveAs(“”);
/* Close the workbook and quit Excel */
&oWorkApp.ActiveWorkbook.Close();
&oWorkApp.Quit();
This script creates a multi-sheet Excel report, renames sheets, writes data to cells, deletes unused sheets, and saves the final output.