Generate Report from the XML file.

REM ****************************************Modification Summary ******************************************;
REM SL.No    Developer       Mod. No.   Date          Changes
REM -----  -----------      ---------- ----------  -------------------------------------------
REM  01         Krishnam Raju N      XXXX      11/17/2015       Added code to generate the CSG Report output
REM********************************************************************************************************;
import PSXP_RPTDEFNMANAGER:*;

Local Record &rcdQryPrompts;
Local string &sTmpltID, &sLangCd;
Local date &AsOfDate;
Local File &file;

/* get report definition object */
&sRptDefn = "XXX_EOPS_RPT";
Local string &OUTPUTFMT = "PDF";
&oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&sRptDefn);
&oRptDefn.Get();

&OUTPUTfile = "XXX_EOPS_" | XXX_EOPS_AET.PROCESS_INSTANCE.Value | ".XML";
MessageBox(0, "", 0, 0, &OUTPUTfile);
&file = GetFile(&OUTPUTfile, "W", %FilePath_Relative);
&oRptDefn.ReportFileName = "EOPS Common Application Report" | "_" | XXX_EOPS_AET.PROCESS_INSTANCE;


&oRptDefn.SetRuntimeDataXMLFile(&OUTPUTfile);
/*generate report*/
&sTmpltID = "XXX_EOPS_RPT_1";
&sLangCd = "ENG";
&AsOfDate = %Date;
&sOutFormat = &oRptDefn.GetDefaultOutputFormat();
&oRptDefn.ProcessReport(&sTmpltID, &sLangCd, &AsOfDate, &sOutFormat);

/*publish report */
&oRptDefn.Publish("", "", "", XXX_EOPS_AET.PROCESS_INSTANCE);

Comments

Popular posts from this blog

BI Publisher: If Condition with sub-string in rtf template