cancel
Showing results for 
Search instead for 
Did you mean: 

Export Report as CSV/XML

Former Member
0 Kudos

Post Author: mps77

CA Forum: JAVA

Hi all,i inherited a project that integrated CR XI (11.5.8.826) in a java client. the user may choose what should be done with the report:view, send as email or export as csv or xml.the last part i have to do now. i got the csv export, but it contains the report title, column header, footer in every line. my code:CharacterSeparatedValuesExportFormatOptions csvOptions = new CharacterSeparatedValuesExportFormatOptions(); csvOptions.setSeparator(tagCfg.getCSVSeparator()); csvOptions.setDelimiter(""); csvOptions.setExportMode(ExportMode.legacyMode); ExportOptions exportOptions = new ExportOptions(); exportOptions.setExportFormatType(ReportExportFormat.characterSeparatedValues); exportOptions.setFormatOptions(csvOptions); FileOutputStream fos = new FileOutputStream(tagCfg.getCSVFilename()); PrintOutputController poc = reportClientDoc.getPrintOutputController(); ByteArrayInputStream bis = (ByteArrayInputStream)poc.export(exportOptions); int read; byte[] buffer = new byte[1024]; while((read=bis.read(buffer))>-1) { fos.write(buffer); } fos.flush(); fos.close(); bis.close();can i get a resultset or something similar to access the data of the report?thanks for helpregards mps

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Post Author: Ted Ueda

CA Forum: JAVA

I think the issue you're facing with the CSV has been fixed in the latest Update for the latest version of the JRC.

Crystal Reports for Eclipse version 1 (JRC version 11.8) is available here:

http://diamond.businessobjects.com/product-portal/82

The latest Update (CR4E version 1 Update 4) is available here:

http://diamond.businessobjects.com/node/4659

Sincerely,

Ted Ueda