Jump to content
We've recently updated our Privacy Statement, available here ×

aggregate functions (count, sum, ...) broken (Jaspersoft Studio 5.5.0.final and 5.5.1.final)?


andreasX
Go to solution Solved by andreasX,

Recommended Posts

All I actually like to have is a DISTINCT COUNT on a String column field, but it seems to me that all the aggregate functions behave as if they are simulating the "FIRST" functionality.

I can't believe this is broken and it seems more likely I am missing something very strange here.

(I am quite experienced already with JasperReports and worked with BIRT and other reporting frameworks before as well.)

Looking at the docs I can't see where the problem should be: http://www.jasperassistant.com/docs/guide/ch06s08.html

Finally I created the attached simple sample report based on the sample db and updated to the latest 5.5.1.final release without any progress.

Please anybody tell me the secrets I am missing or to my big surprise assure it's a bug indeed http://community.jaspersoft.com/sites/all/libraries/ckeditor/plugins/smiley/images/cry_smile.gif

Thx

Andreas http://community.jaspersoft.com/sites/all/libraries/ckeditor/plugins/smiley/images/regular_smile.gif

as you can see in the report there is just some page header and summary bands, containing the product id/name/cost labels, the name count, cost count, cost sum and all variations of name count increment types (report/column/page/none). the summary band holds the cost sum. the detail band contains just the details.

But none of the aggregate functions shows aggregated data, but only the first(xxx) result it seems. (so strange anyways that the count(name) shows the first rows name instead of a number :-( ).

http://community-static.jaspersoft.com/sites/default/files/questions/test-report-ext-result.jpg

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

added test-report-ext.jrxml where I added some more aggregate fields, arranged it more userfriendly and color-marked corrent/incorrect values.

green - correct (sql-generated) aggregated data

blue - COUNT(ID) in the Summary Band is the only one that seems correct (in the Header Band its incorrect)

red - wrong (Jasper-generated) aggregated data

Link to comment
Share on other sites

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...