aspose file tools*
The moose likes JSF and the fly likes How create csv format from existing pdf format in Jsf? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "How create csv format from existing pdf format in Jsf?" Watch "How create csv format from existing pdf format in Jsf?" New topic
Author

How create csv format from existing pdf format in Jsf?

Parveen thakur
Greenhorn

Joined: Oct 12, 2011
Posts: 19
Dear Friends , Good morning to all of you?

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 .


Thanks in advance .


Thanks & Regards :

Parveen Thakur.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Parveen thakur
Greenhorn

Joined: Oct 12, 2011
Posts: 19
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.

and provide some solution for this problem.

My Report,,,,,,,,,
,,,,,,Print Date:,22/06/2012 16.37.45,,
,,,My Report Name,,,,,,
,Product:,,,Firss,,,,,
,, Mode:,,,Firt,,,,
,,,,, DBA,,,,
,,Job Name:,,,,,,,
,,,,,Default,,,,
,, Stream:,,,,,,,
,,,,,FF_None,,,,
,,Moe Mode:,,,,,,,
,,,,,12012,,,,
,,Totald:,,,,,,,
,,,,,5112,,,,
, Rejects:,,,,,,,
,,,,,5000,,,,
,,Total ted:,,,,,,,
,,,,,,,,(Page 1 of,1)
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

That, in fact is how it should look in Notepad. Notepad is a dumb text editor and it shows the actual CSV text.

If you want the CSV to display in a more "report-like" format, you need to import it into Excel, not Notepad.
Parveen thakur
Greenhorn

Joined: Oct 12, 2011
Posts: 19
Dear Tim,
How are you? I am using excel as compare to notepad the report open good , But the problem is that data is not shown under the same column

Please sir suggest me !


[Thumbnail for Screenshot.png]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How create csv format from existing pdf format in Jsf?