Category: | Bug report |
Priority: | Normal |
Status: | New |
Project: | Severity: | Major |
Resolution: | Open |
|
Component: | Reproducibility: | Always |
Assigned to: |
Hello
We've noticed a problem with variables whose reset type is set to `Report`. The variables are computed using the wrong field values. The previous record values are used.
To illustrate the problem we've create a sample report 'VariableResetProblem.jrxml.'
This report requires a CSV Data adaptor to run. The contents of the csv file is:
"id";"name"
id1 ; a
id2 ; b
id3 ; c
The datasource hence contains two fields: "id" and "name". We've created a variable MyVar whose expression is $F{name}. It is simply a copy of the field value. When the reset type of MyVar is set to 'Report', the MyVar prints a wrong value! More precisely, the variable prints the previous record value in the group header of the report instead of the current record of the datasource. The detail band prints the correct records values.
Note that if we set the reset type of MyVar to 'none', the variable contains the correct value.
1 Comment: