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
2.1 Counting the number of pages in a pdf file
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();
2.2 Merging PDF
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);
3 Working with .RTF (Document) reporting options in BI Publisher
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.
3.1 Using Barcodes on Report
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:WindowsFont) 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>
Setting this property will make the barcodes visible when the output is pdf
3.2 Dynamic Header and Footer
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.
3.3 Dynamic/Conditional watermark
Ã¼ 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’)?>
3.4 Dynamic images in report output
Ã¼ 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
Ã¼ Fieldname is the record field that holds the path of the image in the report.
4 Working with Excel reporting options in BI Publisher
Following features are available on Oracle-PeopleSoft BI Publisher Excel template.
Ã¼ Multi Sheet excel report- Excel object
4.1 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>”);