need help in Jasper report export to CSV

hi i am having problem in exporting foreign characters to csv file using jasper report.

 

input data :  à À â Â è È é É ê Ê ë Ë î Î ï Ï ô Ô û ù Ù Û ü Ü ÿ ç Ç « » £

 

when i export to csv its not exporting properly.it is displaying like : Ã  À â  è È é É ê Ê ë Ë î ÃŽ ï Ï ô Ô û ù Ù Û ü Ãœ ÿ ç Ç « » £

 

here is the java code :

 

 

new HashMap();REPORT_LOCALE, Locale.US)new FileInputStream(new File("CSV_Report.xml")); new FileOutputStream(new File("CSVReport.csv"));new ByteArrayOutputStream();new JRCsvExporter();JASPER_PRINT, print);OUTPUT_STREAM, byteArrayCSV); But it is working fine for other formate like PDF and HTML,XLS.please suggest any thhing i need to change for CSV formate.

OutputStream ouputCSV =

ByteArrayOutputStream byteArrayCSV =

JRCsvExporter exporterCSV =

exporterCSV.setParameter(JRCsvExporterParameter.

exporterCSV.setParameter(JRCsvExporterParameter.

exporterCSV.exportReport();

ouputCSV.write(byteArrayCSV.toByteArray());

ouputCSV.flush();

ouputCSV.close();

 

 

 

params.put(JRParameter.;

InputStream input =

design = JRXmlLoader.load(input);

report = JasperCompileManager.compileReport(design);

print = JasperFillManager.fillReport(report, params, conn);

 

Map

 

 

 

params =



Post Edited by lreddy at 05/27/2009 19:09



Post Edited by lreddy at 05/27/2009 19:11
lreddy's picture
126
Joined: May 27 2009 - 11:47am
Last seen: 14 years 1 week ago

0 Answers:

No answers yet
Feedback