XML Publisher code for XMLDoc Data source
import PSXP_XMLGEN:*;
import PSXP_RPTDEFNMANAGER:*;
Component string &FilePath;
Local Rowset &rsStg; /*Staging record rowset*/
Local PSXP_RPTDEFNMANAGER:ReportDefn &oRptDefn;
Local PSXP_XMLGEN:RowSetDS &oDS;
Local File &filXsdOutput, &filXmlOutput;
&filXmlInput = "//usr/local/psft/cny/dev/hc900/datafiles/" "Report_" CU_R239_FW_AET.PROCESS_INSTANCE ".xml";
/* Publish report */
&sReportname = "CU_R239_FW";
&oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&sReportname);
&oRptDefn.Get();
&oRptDefn.SetRuntimeDataXMLFile(&filXmlInput);
If CU_R239_FW_AET.CU_REPORT_TYP = "A" Then
&oRptDefn.ProcessReport("CU_R239_FW_4", "ENG", %Date, "PDF");
Else
If CU_R239_FW_AET.CU_REPORT_TYP = "B" Then
&oRptDefn.ProcessReport("CU_R239_FW_5", "ENG", %Date, "PDF");
Else
&oRptDefn.ProcessReport("CU_R239_FW_6", "ENG", %Date, "PDF");
End-If;
End-If;/* send output to destination */
&oRptDefn.Publish("", "", "", CU_R239_FW_AET.PROCESS_INSTANCE);