kiranpvsr Posted August 6, 2013 Share Posted August 6, 2013 I want to create a monthly summary report using crosstab for three categories. For example, say I want to view the Total Items Purchased in an year grouped by month. Total Items sold in an year grouped by month. Total Profit or Loss in the year grouped by month. I've tried to use three crosstabs but they overlap with one another. Is there a workaround or can the crosstab's position be set such that it starts where the previous one ends ? I've attached the screenshot that shows the overlap. There is a table at the extreme left. Next to it are the two crosstabs. As can be seen from the first crosstab, the last two months are overridden.. Link to comment Share on other sites More sharing options...
marianol Posted August 8, 2013 Share Posted August 8, 2013 It is hard without looking at the JRXML but the answer to your question is between the Strech Type and Position Type property you have documentation about that here http://jasperreports.sourceforge.net/sample.reference/stretch/ Link to comment Share on other sites More sharing options...
kiranpvsr Posted August 8, 2013 Author Share Posted August 8, 2013 Don't both of them have got to do with the element's height. I know stretch type will elongate the field vertically if the textfield does not fit in the width specified. But as I have shown in the screenshot, there is no scope for them to be stretched vertically. I have attached the jrxml to the original post for your reference. I have already tried to implement your suggestion but it didnt work. Link to comment Share on other sites More sharing options...
Ganesan Posted October 19, 2014 Share Posted October 19, 2014 I hope you already found a solution for this. However I am posting my answer to help other future readers.When I add multiples crosstabs in a report their data are overlapping in the report output file and I fixed it by adding each crosstab in a separated detail band. <detail><band height="100" splitType="Stretch"><crosstab><!-- Your first crosstab goes here --></crosstab></band><band height="100" splitType="Stretch"><crosstab><!-- Next crosstab goes here --></crosstab></band></detail> Link to comment Share on other sites More sharing options...
reemachakra Posted November 28, 2019 Share Posted November 28, 2019 Ganesan hi, Have you found a solution to this, while putting two crosstabs adjacent to each other, they are overlapping each other.Can you explain me how to avoid overlapping? Link to comment Share on other sites More sharing options...
nitika3892 Posted July 22, 2021 Share Posted July 22, 2021 Hey , i faced the same problem and found a solution atleast for xls/xlsx format by setting the following property :<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/> 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