alamuvinai Posted December 10, 2012 Share Posted December 10, 2012 Hi,I've to ouput the csv with pipe delimeter instead of ",".changed this value in applicationContext.xml, but still the output when the report runs is "," delimited. It should open without any columns/rows, but just data with "|" delimiter. Can someone please let me know how to do this?Thanks Link to comment Share on other sites More sharing options...
augarte Posted December 11, 2012 Share Posted December 11, 2012 Have you checked this? http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.csv.field.delimiterI have never used CSV exporter but I guess you can set this property using JRCsvExporterParamterhttp://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/export/JRCsvExporterParameter.htmlYou should right something like the following: JRCsvExporter exporter = new JRCsvExporter();exporter.setParameter (JRCsvExporterParameter.JASPER_PRINT, YourJasperPrintObject);exporter.setParameter(JRCsvExporterParameter.FIELD_DELIMITER, "|");exporter.setParameter(JRCsvExporterParameter.OUTPUT_FILE_NAME, "YourFileName.csv");exporter.exportReport();Hope this helps.Regards,Aitor Link to comment Share on other sites More sharing options...
alamuvinai Posted December 12, 2012 Author Share Posted December 12, 2012 Hi,Tried the above, but it still doesn't work. Can anyone please give more inputs on this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now