hussainkali Posted June 9, 2010 Share Posted June 9, 2010 I have created a report using a Crosstab which I intend to use for reporting XLS and XLSX reports. I have placed the crosstab in the summary band and it all seems to work well.However, when the number of columns is too high the columns wrap around onto the 'next page' (i.e. under the first lot of data).Is there anyway that I can just get a continuous report going from left to right without the report wrapping round? I have tried setting the JasperPrint ignore pagination property, but this hasn't solved the problem (it does make a difference but it's not how I'd like it). I've attached example reports, one with and one without pagination.Can someone please help :(Post Edited by hussainkali at 06/09/2010 14:21 Link to comment Share on other sites More sharing options...
hussainkali Posted June 9, 2010 Author Share Posted June 9, 2010 ok, I've just found that if I set the Crosstab property PROPERTY_IGNORE_WIDTH then it doesn't wrap around to a new 'page'. However, it looks like I can only set this property globally, which isn't much good to me as I've have to export the report as PDF as well (user can select either PDF, XLS or XLSX). Anyone got any ideas? Link to comment Share on other sites More sharing options...
hussainkali Posted June 9, 2010 Author Share Posted June 9, 2010 I've tried the following code, and although the property does seem to be getting set, it doesn't seem to have any effect on the report output. If anyone knows how to do this I'd really appreciate the help!Code:if (getSelectedReportFormatName(outputFormatId).equals("Excel 2007")) { jasperReport.setProperty(JRCrosstab.PROPERTY_IGNORE_WIDTH, "true");}else { jasperReport.setProperty(JRCrosstab.PROPERTY_IGNORE_WIDTH, "false");} Link to comment Share on other sites More sharing options...
hussainkali Posted June 10, 2010 Author Share Posted June 10, 2010 Although I didn't get any feedback, just incase anyone else has the same issue, I've managed to get it working:Using the conditional property set in my last post didn't work because the crosstab in the report template had the property set to false. I didn't realise that by setting this property in the report template that it could not be changed at runtime (the property being specified in the crosstab overrides any global report property setting).By removing ignoreWidth="false" altogether from the crosstab definition allowed me to set the property globally before filling the report.Hope this helps someone else,Hussain Ali Link to comment Share on other sites More sharing options...
puranik01 Posted November 18, 2014 Share Posted November 18, 2014 Hi , I am facing the same problem but my report is not developed with the cross tab. It's a simple report with two sub reports inside of that. Each sub report should be displayed in the separate worksheet. Can you please help on this? Link to comment Share on other sites More sharing options...
guganji2009 Posted August 6, 2018 Share Posted August 6, 2018 I am not able export the crosstab content to excel. it is printing as blank. (only cross tab details are not printing) . Any solution ? 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