Jump to content

Variable totals .... BUG???


greenockboy

Recommended Posts

Hi

I recently psted a question regarding calculating variable totals using ireport.

I have looked into this problem and have come across an anomaly.

I recently managed to retrieve integer data using a scriptlet method and assigned the values to a variable.

I then created another variable and set it's calculation type to Sum and it's expression to the first variable......ireport successfully displayed the total.

However, when I tried to retrieve and display values for a second column from the same table (using the same scriptlet method) I ran into problems.

ireport at first would only display the first value totals.
When I tried to altert the method code and swap each of the statements in order to try to work out what was happening the ireport refused to work out any totals.

When I reset my code to match the original then ireport would still not display the totals that it previously had, even with everything exactly the same.

If anyone has had similar experiences and can shed some light then I would be very gratefull.

Incidently to display field values that have come from a scriptlet method then place the method call in the afterDetailEval event.
To display group totals for the variable then place the same call in the beforeDetailEval() event. At least it worked for me...when it did work.

Post edited by: greenockboy, at: 2007/02/21 11:30

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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