I have a problem to create .CSV format in jsf. Actully I have successfully created .PDF files of my jasper report form jrxml in jsf. I have created a BO for fields of jasper report,and crate a seprate dao for database connectivity . and In handler I have write the code to genterate the pdf file now I want to create .csv format using this data ? Please Help me . If any related link with example.
The following code is working fine for Pdf format now I want to create csv format .
You would do far better to use a servlet or JSP to do this kind of stuff. JSF is designed for forms processing, not document processing, and forcing it to create documents is comparatively messy.
In fact, for a CSV file, a straight JSP without JSF can be quite simple indeed. Essentially, just a useBean tag, a JSTL loop, and template of the CSV line to output with EL expressions to retrieve the row properties.
Plus, of course, the JSP elements that set the content-type.
An IDE is no substitute for an Intelligent Developer.
Joined: Oct 12, 2011
Dear Tim ,
Thanks for reply ? I have code for csv ,but now the problem is the report is not show properly when I open it in notepad.It will add ,,,,, with document .....Please see below the repot formt.