[#14701] - Variables use wrong field values of previous record

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.

v6.17
jasper library
tcleenewerck_1's picture
Joined: Mar 19 2019 - 7:10am
Last seen: 1 month 2 weeks ago

1 Comment:

#1
  • Reproducibility:N/A» Always
Feedback