tieTYT Posted March 12, 2008 Share Posted March 12, 2008 I have this form that lets you choose which columns show up on the report. Is there any way to make the columns slide over to take up space if adjacent columns are invisible? I don't want a big white gap on my reports. Note that I have to export this to Excel, so I don't want any blank columns Thanks Link to comment Share on other sites More sharing options...
tieTYT Posted March 13, 2008 Author Share Posted March 13, 2008 bump Link to comment Share on other sites More sharing options...
lucianc Posted March 13, 2008 Share Posted March 13, 2008 There is no such feature built into JasperReports. The only solution would be to load the report as a JasperDesign object, to manually update it using the API and to recompile it. If you're only exporting the report to XLS, you could leave the gaps in the report and set the IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS flag when exporting. Regards,Lucian Link to comment Share on other sites More sharing options...
mtaylor Posted June 5, 2008 Share Posted June 5, 2008 IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS only removes whitespace between elements, correct? when exporting to XLS it will not remove the designated space for the element that is to be suppressed, say, based on a printWhenExpression, correct? are there plans to implement such a feature?i do not see it in the feature request list:http://jasperforge.org/sf/tracker/do/listArtifacts/projects.jasperreports/tracker.feature_requests i would think this is a fairly common requirement. thanks,/mt Link to comment Share on other sites More sharing options...
lucianc Posted June 6, 2008 Share Posted June 6, 2008 mtaylor wrote:IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS only removes whitespace between elements, correct? when exporting to XLS it will not remove the designated space for the element that is to be suppressed, say, based on a printWhenExpression, correct? If the elements on a column have prinWhenExpressions that suppress them, the resulting report would have empty space where the elements would have been positioned and IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS would remove that space when exporting to Excel (given that the entire column is empty). are there plans to implement such a feature?i do not see it in the feature request list:http://jasperforge.org/sf/tracker/do/listArtifacts/projects.jasperreports/tracker.feature_requestsi would think this is a fairly common requirement. If there is no such feature request and you think this would be useful, please log a feature request yourself. Regards,Lucian Link to comment Share on other sites More sharing options...
mtaylor Posted December 10, 2008 Share Posted December 10, 2008 Thanks.I thought this solved my issue, but it appears the IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS only 'hides' the empty columns in the resulting XLS document. I have attached an image as an example (xlsImage.png). You can see the columns 'K' and 'L' have both been hidden. The report didn't find values for those fields, and we set the property to remove the empty space on the XlsExporter. This causes issues if the user wants to resort the data in the XLS document.Is is possible to completely remove such columns? thank you in advance! Link to comment Share on other sites More sharing options...
lucianc Posted December 11, 2008 Share Posted December 11, 2008 Yes, that's indeed the case with the POI-based XLS exporter; this is logged as a bug.You could consider switching to JExcelApiExporter as a workaround.Regards,Lucian 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