AE,XMLP进程区别??

本文介绍了如何使用应用引擎(Application Engine)进程来运行PS查询并生成XMLPublisher报告。包括从运行控制获取参数、设置报告定义对象及生成PDF格式报告的过程。同时,针对运行时出现的错误提供了代码示例及寻求帮助。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 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?

基于开源大模型的教学实训智能体软件,帮助教师生成课前备课设计、课后检测问答,提升效率与效果,提供学生全时在线练习与指导,实现教学相长。 智能教学辅助系统 这是一个智能教学辅助系统的前端项目,基于 Vue3+TypeScript 开发,使用 Ant Design Vue 作为 UI 组件库。 功能模块 用户模块 登录/注册功能,支持学生和教师角色 毛玻璃效果的登录界面 教师模块 备课与设计:根据课程大纲自动设计教学内容 考核内容生成:自动生成多样化考核题目及参考答案 学情数据分析:自动化检测学生答案,提供数据分析 学生模块 在线学习助手:结合教学内容解答问题 实时练习评测助手:生成随练题目并纠错 管理模块 用户管理:管理员/教师/学生等用户基本管理 课件资源管理:按学科列表管理教师备课资源 大屏概览:使用统计、效率指数、学习效果等 技术栈 Vue3 TypeScript Pinia 状态管理 Ant Design Vue 组件库 Axios 请求库 ByteMD 编辑器 ECharts 图表库 Monaco 编辑器 双主题支持(专业科技风/暗黑风) 开发指南 # 安装依赖 npm install # 启动开发服务器 npm run dev # 构建生产版本 npm run build 简介 本项目旨在开发一个基于开源大模型的教学实训智能体软件,帮助教师生成课前备课设计、课后检测问答,提升效率与效果,提供学生全时在线练习与指导,实现教学相长。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值