Skip to content

Faulty variable calculation when using resetType None #466

Description

@tcleenewerck

When a counter is created that uses the previous value of a variable, that its result is not correct because the expression of this variable is executed twice.

Two counters have been created.

  • myCounter1 uses the previous value of the variable to incrementally compute the sum and resetType None
  • myCounter2 uses the SUM calculation method and a resetType Report

The first counter is incorrect.
The second counter is correct.

Note that when the resetType of myCounter1 is set to Report than the calculation is correct.

If you debug the code, you'll notice that the expression of a variable is computed multiple times causing myCounter1 to be incremented twice for each record.

An example report has been created with a csv data set, an adaptor and a simple jrxml report.

Archief.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions