You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

how to create xmlp reports using data source as xml file

2 replies [Last post]
Guest's picture
Guest

Hi,

How to run the xml file in xmlp.please provide me the steps.

Thanks in advance.

Guest's picture
Guest (not verified)
Re: how to create xmlp reports using data source as xml file

Create record definition in Application Designer
Create file layout definition in Application Designer - File Layout Format = XML
Create Application Engine program to output the XML file
--XML Publisher Menu
Create the Data Source definition
Create the Record Defintion
--Process Scheduler
Create the Process (same name as Application Engine)

/*APPLICATION ENGINE PEOPLECODE*/
Local Record &Rec, &Record, &RptRecord;
Local File &File;
Local SQL &SQL;

/*Create Rowset*/
&rs = CreateRowset(Record.UAP_GL_TMP1);

/*Fill Rowset*/
&numread = &rs.FILL("");

REM MessageBox(0, "generic message ", 20000, 1, "nothing", "Fill, number read: ", &numread, " Active Rowcount &RptRS", &cnt);

/*Create SQL object */
&SQL1 = CreateSQL("%Insert(:1)");

&File = GetFile("Z:\temp\uap_conv_file.xml", "W", %FilePath_Absolute);
If &File.IsOpen Then
If &File.SetFileLayout(FileLayout.UAP_CONV_REPORT) Then
&Record = CreateRecord(Record.UAP_GL_TMP1);
&SQL = CreateSQL("%Selectall(:1)", &Record);
While &SQL.Fetch(&Record)
&File.WriteRecord(&Record);
&File.WriteLine("");
End-While;
Else
Error ("File Layout Not Correct");
End-If;
Else
Error ("file not open");
End-If;
&File.Close();

/*APPLICATION ENGINE PEOPLECODE*/
There is another piece of code that "runs" and produces your report output.

Guest's picture
Guest
Re: how to create xmlp reports using data source as xml file

Very helpful. Could you please provide the remaining code.