My question is how can I change the delimiter in my jasperserver file exports. It is the customary "," now and I want to change that to a tab. I want to make this change globally within my server not individually for each report if I can. I have searched and found several answers but none seem to work for me. The various solution mainly talked about making the change for specific reports not globally. The other solutions were for iReports not Jasperserver. I am running jasper server 4.7 on tomcat 6 within ubuntu 10.04. One solution that got me the closest talked about changing the file applicationContext.xml. When I go into that file and change the line below "," to "something else it works". The problem is that I can't find the proper way to represent a tab. If I do "\t" it comes out literal. If I change it to any number of other xml entities that I have found for tab the server will not restart. If I actually do "then hit the tab key" it puts " for some reason.
<bean id="csvExportParameters" class="com.jaspersoft.jasperserver.api.engine.jasperreports.common.CsvExportParametersBean"> <property name="fieldDelimiter" value=","/> </bean>
3 Answers:
The above answer would not work the applicationContext.xml overrides jasperreports.properties. I finally got it to work by using 	 in the applicationContext.xml.
<bean id="csvExportParameters" class="com.jaspersoft.jasperserver.api.engine.jasperreports.common.CsvExportParametersBean"> <property name="fieldDelimiter" value=","/> </bean>
Changed to
<bean id="csvExportParameters" class="com.jaspersoft.jasperserver.api.engine.jasperreports.common.CsvExportParametersBean"> <property name="fieldDelimiter" value="	"/> </bean>
You can do this by setting the global jasperreports.properties (file should be located at <js-install>/tomcat/webapps/WEB-INF/classes/jasperreports.properties or similar).
Have a look at the config reference:
Cheers, Thomas
I was not able to use your suggestion. The jasperreports.properties file gets overridden. I posted my resolution below. If you know how I can make it work using the jasperreports.properties file I would prefer to do it that way, it looks a lot simpler. I tried commenting out the lines of code in the applicationContext.xml file but when I did jasperserver would not reboot. I am sure there is something else that I need to comment out further up the chain but as it is working for now I will leave that for another day. Thanks for your help.
Edit: posted to wrong thread
I have tried your solutions above with no success. Just to check, when I click on a cube it gives me certain counts. When I click on the total it open a new window which gives me an option to do an Excel export (csv) which needs to be semi-colon delimited. Am I looking in the right place?
Thanks
Carlo
That´s new for me. Thanks for your hint.
Thomas
I have tried your solutions above with no success. Just to check, when I click on a cube it gives me certain counts. When I click on the total it open a new window which gives me an option to do an Excel export (csv) which needs to be semi-colon delimited. Am I looking in the right place?
Thanks
Carlo