[#5532] - Crosstab Measures are at random empty (do not match data)

Bug report
Feedback Requested
Project: Severity:
Component: Reproducibility:
Assigned to:


we are experiencing some issues with the crosstab. For some reason we have several cell which are displayed as 0.00. However the total Sum of ALL the cells is matching the reality of the retrieved data.

Test 1 10
Test 2 10
Test 3 10

Expected Crosstab
Total 1 2 3
Test 30 10 10 10

Returned Crosstab
Total 1 2 3
Test 30 10 0 10

At random within the dataexport some cells are displayed as empty.
However if I perform the statement directly on the database the data is available and if I display this within the detail section it is also available.

I've attached the report, resource bundle and the retrieved database records (in Excel file)

Office spreadsheet icon Data_Crosstab.xls21 KB
Binary Data Hedge.properties603 bytes
Binary Data Hedge.jrxml23.55 KB
File Result.csv703 bytes
Binary Data Hedge_TEST.jrxml21.2 KB
File table_export.csv3.53 KB
Binary Data ddl.sql794 bytes
Binary Data data.sql10.06 KB
Binary Data Hedge_TEST2.jrxml22.88 KB
fenix4life's picture
Joined: Oct 5 2009 - 5:27am
Last seen: 6 years 8 months ago



isDataPreSorted="true" assumes that the data is presorted by a specific order as explained at http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/schema...

Are you sure your data is sorted accordingly? Does the problem disappear if you reset the isDataPreSorted flag?



Hmm, a bit of a double feeling there.
It's indeed correct that removing that flag is resulting in correct values however I've created my query such that the data returned by the database is sorted in the way, I think, it needs to be processed.

In this crosstab I have 1 line for every vehicle and then for every Year (sort asc), every month (sort asc).

The data returned by the SQL (shown in the excel) is effectively sorted on vehicle (only 1) year and month. In the last column you can see the months and years going up like a regular calendar.

I added this sort statement to avoid any possible performance issue during report generation as I think sorting is quicker if I let the Oracle database perform this.


Apparently a similar issue was report @ iReport tracker (number 0004567 and 0004873)

I'm currently using variants of the sort / group by clause which results in the same dataset but still without luck to be using the 'Data is presorted'.
Removing this flag results in a 'Heap issue' as I'm processing rather a lot of records.


The problem doesn't reproduce using the data from the XLS file. Do you have another data file (or some other kind of test case) that can be used to reproduce the issue?



I've created a stripped out version of the report and select statement based upon a load of the content of the data mentioned in the xls file into an Oracle database


This was a bug in 3.7.1 that got fixed shortly after the release (more precisely in SVN revision 3380).

Upgrading to a newer release should fix the problem.


  • Status:Resolved» Closed
  • Resolution:Fixed» Reopened
  • Status:Closed» Feedback Requested
  • Assigned:nobody»

Hi, like I see, this topic was closed nearly 8 years ago.
But I do have the same issue, currently using Jaspersoft Studio 6.15.0 on Mac OS.
Is it possible to reopen this again?

Best regards