Multiple crosstabs overlap when adjacent to each other

0

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..

kiranpvsr's picture
Joined: Jul 8 2011 - 6:40am
Last seen: 6 years 3 months ago

2 Answers:

0

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/

marianol's picture
4788
Joined: Sep 13 2011 - 8:04am
Last seen: 1 year 1 month ago

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.

kiranpvsr - 6 years 3 months ago
0

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>

Ganesan's picture
Joined: Jul 27 2014 - 11:17am
Last seen: 2 years 7 months ago
Feedback
randomness