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

javier.8

Members
  • Posts

    1
  • Joined

  • Last visited

javier.8's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hello Everyone. Here's my problem. I have a report with a simple group. If the sum() of the price column of that group equals 0, I should not display that entire group. I made you an example. The group name is SERVICE. The Rows beginning with "Service:" are group headers. The rows beginning with "Total" are group footers. Service: Transportation Item 13122 10.60 Item 13434 20.50 TOTAL 31.10 Service: Handling Item 6579 35.7 Item 7256 -35.7 TOTAL 0 What I need to do is NOT TO SHOW the header, footer and the items of the Handling Service, as the total for that service is 0. The main problem is that the SUM function in jasper is not actually a function, but rather a variable being accumulated as the report rows are being fetched. But at the time of the "print when expression" this variable is not yet accumulated. So when the print when expression is being evaluated It hides everything, even the Transportation service group (because that variable is reset to 0 at the beginning of the group). I've been searching the web all morning, and I can't find the answer. To make my question formal: How do I use the "print when expression" of a group based on the sum() of a field of that same group? In this case, how do I hide the groups in which the group total is 0? Thank you very much in advance.
×
×
  • Create New...