使用AE调用XML Publisher 时。数据源的选择和生成报表的代码紧密相关。
XML File 数据源: 所用方法 SetRuntimedataxMLFile
XML Doc 数据源: 所用方法 SetRuntimedataxMLDoc
RowSet 数据源: 使用方法 SetRuntimeDataRowset
Query数据源 : SetPSQueryPromptRecord
此由如下代码控制:
Evaluate &Report.Ds_type When = "QRY" rem rsh ICE 1836783000; &sDataFile = %This.sSrvTmpDir | &sDirSep | "Data" | &sDirSep | &sDataFile; %This.GenerateXmlFileFromQuery(&sDataFile); Break; When = "CQR" /* Connected Query */ rem mdu XXX %This.GenerateXmlFileFromConnQuery(&sConQryOutFileName,&sProcessId); %This.GenerateXmlFileFromConnQuery(&sConQryOutFileName,String(&ProcessInstance)); /* mdu XXX */ If Not FileExists(&sConQryOutFileName,%FilePath_Absolute) Then throw CreateException(235,2308,"Data file is required but not specified correctly"); Else %This.SetRuntimedataxMLFile(&sConQryOutFileName); End-If; &sDataFile = &dataxMLFile; Break; When = "RST" rem rshw TODO: This function needs to be passed file path instead of returning string; &sXmlData = %This.GenerateXmlFromRowset(); If &sXmlData = "" Then throw CreateException(235,2305,"Failed to generate or read data source XML file"); End-If; rem rsh ICE 1836783000; &sDataFile = %This.sSrvTmpDir | &sDirSep | "Data" | &sDirSep | &sDataFile; %This.WriteXmlDataFile(&sXmlData,&sDataFile); Break; When = "XMD" &sXmlData = %This.GenerateXmlFromXmlDoc(); If &sXmlData = "" Then throw CreateException(235,&sDataFile); Break; When = "XML" If &dataxMLFile = "" Then throw CreateException(235,"Data file is required but not specified correctly"); End-If; &sDataFile = &dataxMLFile; Break; When-Other Break; End-Evaluate;原文链接:https://www.f2er.com/xml/299709.html