This blog includes the steps to implement PeopleSoft enhanced features in reporting.
2. Working with PDF reporting options in BI Publisher
The following BI features are available on PDF documents.
ü Counting the number of pages in a pdf file
ü Merging PDF
The java object ‘com.lowagie.text.pdf.PdfReader’ is used to find the number of pages in a pdf file.
Local JavaObject &obj_Split_PDF_Size = CreateJavaObject("com.lowagie.text.pdf.PdfReader", “<PDF file with full path>");
/* &NumberofPages – gives the number of page in the PDF file */
Local number &NumberofPages = &obj_Split_PDF_Size.getNumberOfPages();
The application Package PSXP_ENGINE:PDFMerger can be used to merge two PDF files.
&Reportmrg = create PSXP_ENGINE:PDFMerger();
&ret = &Reportmrg.mergePDFs(<Array of input files to be merged as array of strings>, <Output Merged File>, &out);
Following features are available on Oracle-PeopleSoft BI Publisher .rtf template.
ü Using Barcodes on Report
ü Dynamic/Conditional Watermark
ü Dynamic images in the report output
ü Headers & Footers.
The following step needs to be carried out to use barcode on BI publisher reports.
ü Corresponding barcode font has to be downloaded and placed in the local machine (C:\Windows\Font) and also the Application Server (<Server path>/fonts/truetype/).
ü The field to be displayed as barcode is first included in the template and the font of the field is changed to the downloaded barcode font.
ü In File > Properties and in the custom tab enter the following details
Name: xdo-font.<font name>
Value: truetype.<path to the font file>
Form fields cannot be inserted into header/footer of rtf templates. So to have dynamic or conditional text in header or footer, the xml tags are directly written in header and footer which then converts to values when the report is run.
ü Watermark is entered through Format> Background > Printed Watermark in the rtf template.
ü In the text enter the condition
Eg: <?xdoxslt:ifelse(<condition>,'Watermark to be displayed when the condition is satisfied','Watermark to be displayed when the condition is not satisfied')?>
ü The dynamic image may be in any of the following format- jpeg/ bmp/ gif/ png.
ü Hold the path of the dynamic image in a record field used in the report.
ü Insert a dummy image in the template.
ü By double clicking and in the web tab of the image enter the dynamic value/field as below in the alternative text.
// - - > For level 0 record
.// - - > For level 1 record
Following features are available on Oracle-PeopleSoft BI Publisher Excel template.
ü Multi Sheet excel report- Excel object
The following peoplecode generates multisheet excel with the excel application
&oWorkApp = CreateObject("COM", "Excel.Application");
&oWorkApp.DisplayAlerts = "false";
ObjectSetProperty(&oWorkApp, "Visible", True);
&oWorkBook = ObjectGetProperty(&oWorkApp, "Workbooks");
&oWorkSheet = &oWorkApp.Worksheets("Sheet1");
/* Modify the name of the worksheet */
&oWorkSheet.name = "Test Sheet";
/*Access the cells of the worksheet */
&oWorkSheet = &oWorkApp.Worksheets("Sheet2");
&oWorkSheet.name = "Access";
/*Delete the third sheet */
&oWorkSheet = &oWorkApp.Worksheets("Sheet3");
&oWorkApp.ActiveWorkbook.SaveAs("<File name with full path to save>");