Search This Blog

Showing posts with label XML Publisher. Show all posts
Showing posts with label XML Publisher. Show all posts

Wednesday, June 12, 2013

BI Publisher: Page number Reset

Agenda: To reset the page number when there is change in invoice number etc.

In the below example , we reset the page number once the Employee DeptID gets changed.

Below is the sample XML data.


Load the XML data successfully into RTF template.
After that get the data from Table Wizard and group the data by Deptid with Section break selected.
Below are the snapshots.



 

Add the Page Number to the Footer at the End as show below.

Now save the template and see the preview. The page number gets reset for change in DeptID as shown below.





Tuesday, March 12, 2013

XML Publisher Passing Run Control values to PS Query as Data Source

XML Publisher.
Data Source:  PS query

Below is the code to pass values from Application Engine State Record to PS Query prompt record.
Input values are FromDate and ThruDate.

The XML Publisher then runs the report based on input values and generates the output.


import PSXP_RPTDEFNMANAGER:*;
local string &sRptDefn = ‘PAYROLL_RPTDFN’;
/* get report definition object */
&oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn (&sRptDefn);
&oRptDefn.Get();

/* fill query runtime prompt record */
&rcdQryPrompts = &oRptDefn.GetPSQueryPromptRecord();
&FieldName1 = &rcdQryPrompts.GetField(1).Name;
&FieldName2 = &rcdQryPrompts.GetField(2).Name;

/* MessageBox(0, "", 0, 0, "The First field name is : " | &FieldName1); */
/* MessageBox(0, "", 0, 0, "The Second field name is : " | &FieldName2); */

&rcdQryPrompts.GetField(1).Value = PS_PAYROLL_AET.FROM_DATE;
&rcdQryPrompts.GetField(2).Value = PS_PAYROLL_AET.TO_DATE;

If Not &rcdQryPrompts = Null Then
  &oRptDefn.SetPSQueryPromptRecord(&rcdQryPrompts);
End-If;
/*generate report*/

&oRptDefn.ProcessReport (&sTmpltID, &sLangCd, &AsOfDate, &sOutFormat);
/*publish report */

Tuesday, February 19, 2013

XML Publisher Migration objects

The following definition types can be added to projects in Application Designer:
  • XMLP Data Src Defn.
  • XMLP File Defn.
  • XMLP Report Defn.
  • XMLP Template Defn.
If the data source for the XMLP report is PS Query or Connected Query, then the query or connected query definition should also be included in the project.

Source: Peopletools 8.50

XML Publisher named as BI publisher in 8.52
 Definition types
BIP DataSource Definitions
BIP File Definitions
BIP Report Definitions
BIP Template Definitions.

Source: Peopletools 8.52