AE,XMLP进程区别??

来源:互联网 发布:淘宝怎么联系在线客服 编辑:程序博客网 时间:2024/05/16 07:39

 http://www.google.com.hk/#hl=zh-CN&newwindow=1&safe=strict&site=&q=AE%2CXMLP&btnK=Google+%E6%90%9C%E7%B4%A2&oq=&aq=&aqi=&aql=&gs_sm=&gs_upl=&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=c232ac5c9d7fc610&biw=1280&bih=799

 

 created an Application Engine process to run PS Queries to XML Reports.

Before creating the App Engine process,
Within my app engine process i have one step that gets the parameters of my run control - I'm looking for a specific group_id:

%Select(GROUP_ID_SF)
SELECT GROUP_ID_SF
FROM PS_ZSF_FADIS_RNCTL
WHERE OPRID = %OperatorId
AND RUN_CNTL_ID = %RunControl

I have another step that brings in the date.

You have to create a STATE (ZSF_FADIS_AET) record to include the parameters in.

Here is the peoplecode within the step that runs the PS Query:

import PSXP_RPTDEFNMANAGER:*;

/* XML Publisher report using query data source */
Local string &sRptDefn = "ZSF_FAAWD";
Local string &sLangCd = "ENG";
Local string &sOutFormat = "PDF";
Local date &AsOfDate = %Date;
Local date &PostedDate;
Local string &sFolder = "XML Publisher"; /* Report Manager */
Local integer &intProcInstance;
Local string &strQueryName, &strGroupID;
Local Record &recQryPrompts;

Local PSXP_RPTDEFNMANAGER:ReportDefn &oRptDefn;

/* Gets the Process Instance and Group ID from Run control*/
&intProcInstance = ZSF_FADIS_AET.PROCESS_INSTANCE;
&strGroupID = ZSF_FADIS_AET.GROUP_ID_SF;
&PostedDate = ZSF_FADIS_AET.POST_DT;

/* get report definition object */
&oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&sRptDefn);
&oRptDefn.Get();

/* Gets the prompts */
&recQryPrompts = &oRptDefn.GetPSQueryPromptRecord();
&recQryPrompts.GetField(1).Value = &strGroupID;

If Not &recQryPrompts = Null Then
&oRptDefn.SetPSQueryPromptRecord(&recQryPro mpts);
End-If;

/* generate Report */
&oRptDefn.ProcessReport("", &sLangCd, &AsOfDate, &sOutFormat);

etc.

I hope this helps.

Maria







Hi,
I am facing issue while running XML publisher report from Application Engine. I am getting below error .
Error generating report output : (235,2309) PSXP_RPTDEFNMANA GER.ReportDefn.OnExecute Name :Process Report PCPC:51552 St atement:1153 Called from:TESTAE.MAIN.GBL.de fault.1900-01-01.Step05.OnExec ute Statement:24 .
I used below people code in AE to publish report.
********************************************** ********************
import PSXP_RPTDEFNMANAGER:*;
import PSXP_XMLGEN:*;
Declare Function GetDirectoryFromPath PeopleCode PSXPFUNCLIB.FUNCLIB FieldFormula;
&sRptDefn = "XMLPROWSET";
&sTemplateId = "XMLPROWSET_1";

&sLangCode = "";
&dtAsOfDate = %Date;
&sOutputFmt = "PDF";
&RptOutputDir = "c:\temp\";
CreateDirectory("XMLP", %FilePath_Relative);

Local File &log1;
REM &log1 = GetFile("C\temp\123.txt", "w", %FilePath_Absolute);
rem &ReportDef.OutDestination = &RptOutputDir;
/*Set-Up Report*/
&ReportDef = create PSXP_RPTDEFNMANAGER:ReportDefn(&sRptDefn);
&ReportDef.Get();
/*Create Rowset*/
&rs = CreateRowset(Record.PERSONAL_DATA);
/*Fill Rowset*/
&rs.FILL("WHERE FILL.EMPLID LIKE '004%'");
/*Create Schema*/
&rds = create PSXP_XMLGEN:RowSetDS(); /*package method*/
&mySchema = &rds.GetXSDSchema(&rs);
&f1 = GetFile("c:\temp\JOB_XSD.xsd", "W", %FilePath_Absolute);
&f1.WriteLine(&mySchema);
&f1.Close();
/*Create Sample XML File*/
&myXMLFile = &rds.GetXMLData(&rs, "c:\temp\JOB_XSD.xsd");
&f2 = GetFile("c:\temp\JOB_XML.xml", "W", %FilePath_Absolute);
&f2.WriteLine(&myXMLFile);
&f2.Close();
/* output format */
&sOutputFormat = &sOutputFmt;
/*Provide a Data Source for the Report*/
&ReportDef.SetRuntimeDataRowset(&rs);
/*Generate the Report*/
&ReportDef.ProcessReport("XMLPROWSET_1", %Language_User, %Date, &sOutputFormat);
/*Publish the Report*/
rem &ReportDef.Publish("", &RptOutputDir, "XMLP", JOB_AET.PROCESS_INSTANCE);
rem &sFileExt = GetFileExtension(&sOutputFormat);
rem &ReportDef.Publish("", "", "", HR_TSTRWSET_AET.PROCESS_INSTANCE);
REM &log1.WriteLine("directory" | &RptOutputDir);
REM &log1.WriteLine("Processintance" | HR_TSTRWSET_AET.PROCESS_INSTANCE.Value);
Evaluate %OutDestType
When 6 /* Web */
&ReportDef.Publish("", "", "", HR_TSTRWSET_AET.PROCESS_INSTANCE);
Break;
When 3 /* Printer */
&oRptDefn.PrintOutput(%FilePath);
Break;
End-Evaluate;
rem &ReportDef.DisplayOutput();
********************************************** ******************************
I would like to inform you that same people code is working fine when replicated code in field change event. I am able to run XMLP data Rowset report through field change event.
Could you please help me on this?

原创粉丝点击