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 a csv or pdf through application engine

5 replies [Last post]
Guest's picture
Guest

Hello ,

I want to create a pdf or csv file using aplication engine (not any third party tools).If any body knows please do need full.

Note: Currently we are using the peopletools 8.22 and application is 8.3

Thanks in ADV
Ravi Kumar.

rahulkhandelw's picture
User offline. Last seen 9 years 20 weeks ago. Offline
Joined: 10/16/2009
Posts: 34
Re: How to create a csv or pdf through application engine

I have no idea about creating pdf files. For csv file... do the following

Create a file object using getfile function in write mode..

then use writeline method to write data on file..

Lepa's picture
User offline. Last seen 1 year 49 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: How to create a csv or pdf through application engine

Use FileLayouts to create CSV files - Its so easy a cave man can do it!

PeopleBooks has lots about using FileLayouts :)

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Guest's picture
Guest
Re: How to create a csv or pdf through application engine

&deli = Char(44);
Global File &fileLog;
SQL &sql;

&fileLog = GetFile("C:\temp\Detailed_Learning_report.csv", "W", "A", %FilePath_Absolute);

&STMT = "ENROLLMENT_ID" | &deli | "COURSE_CODE";

&fileLog.WriteLine(&STMT);

&sql = GetSQL(SQL.mySQL, &a, &b, &c); /*a,b,c are run control parameters if any*/

While &sql.Fetch(&select_variables_from_sql); (alias names for fields which we are selecting in query)

&STMT = &field1| &deli | &field2 ;
&fileLog.WriteLine(&STMT);
End-While;

Guest's picture
Guest
Re: How to create a csv or pdf through application engine

For Creating pdf files you can either use below three methods.
a) You can use PSQuery classes to process and store the data, and one delivered method runtofile can be used to generate the file in pdf format.
b) Also you can generate the pdf file in peopelcode by importing exernal java packages , you can refere AE: GP_EPA.
C) the last option which i suggest may not be feasible, uase app egnine to process the data ans store it in some table. Use SQR to get the data and generate the report.

Thanks and Regards !
Imran Patel

Guest's picture
Guest
Re: How to create a csv or pdf through application engine

XML Publisher