sonarjames Posted November 11, 2010 Share Posted November 11, 2010 Hi all, I am using jasperreports-3.7.5 and iReport 3.7.5. I have a report which displays OK in the preview however once exported I am not able to 'sort' the cells properly. Originally the issue was that rows were being collapsed/merged and this was solved by setting this option in jasperreports.properties:net.sf.jasperreports.export.xls.collapse.row.span=trueThis setting helped out, and Excel stops complaining that cells are merged now. However this has lead onto another issue, where we have noticed that if the content in a field starts printing at the bottom of one page, and is long enough to continue and finish on the second page, this will export to two separate rows in Excel. The second row will have the extra content from the second page, and the other fields are blank, so when you sort or filter, this data will be excluded. I have tried experimenting with various properties on the text boxes too without much luck, “Print Repeated Values”, “Print In First Whole Band”, “Print When Detail Overflows”, “Stretch with Overflow” etc. According to the documentation @ http://jasperreports.sourceforge.net/config.reference.html I had high hopes for this property: net.sf.jasperreports.print.keep.full.text=true I have tried setting this in jasperreports.properties, also in the report XML, and the text boxes in the report, all to no avail. The properties such as net.sf.jasperreports.export.xls.break.after.row looked like they may help but they seem to be related to excel exports on multiple sheets - I only want the export to be on one sheet/page. Unfortunately disabling pagination for the report entirely is not an option as some reports are 625 pages which is far too much to display in one page in the preview. Currently I have the headers/footers hidden to stop repeating on each page to simulate one page in the export. Is there a way to disable pagination for CSV/XLS exports but still render the servlet with pages? Have I missed some other configuration setting which could help me? Any help or direction would be most appreciated. Thanks, James Post Edited by sonarjames at 11/11/2010 04:02 Link to comment Share on other sites More sharing options...
sonarjames Posted November 17, 2010 Author Share Posted November 17, 2010 Just out of interest has anyone ever had success with net.sf.jasperreports.print.keep.full.text ? It doesn't seem to work how I thought it would. Link to comment Share on other sites More sharing options...
ibrana Posted March 16, 2011 Share Posted March 16, 2011 It works if you add the property net.sf.jasperreports.print.keep.full.text=true on the Text Field Properties (but Stretch with Overflow flag needs to be unchecked). And the cell height must be greater than font size, it seems that using this property requires more vertical space. 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