Field not found

0

Hi, is it possible to somehow map a bean value to the jrxml field if the field name mentioned in jrxml starts with the capital letter?

It does work properly if I change $F{Start} to $F{start} in jrxml but unfortunately I cannot modify jrxml. 

I tried different getters, neither helped.

 

rmikhaylenko's picture
Joined: Nov 19 2019 - 1:06am
Last seen: 1 week 2 days ago

2 Answers:

0

IMHO actually the BeatDatasources uses reflection with invoking getter-Calls of the Bean - not sure whether newer versions of JasperReports do still so, as reflection will be forbidden in future java releases when I understood right.  

When I remember right, you could use the description at the Fields in jrxml to "wrap" it to something other in the class names.

But you said, that you can't modify the jrxmls actually... so the only (dirty) idea I have, just rename the fields in your class to "Capitalized" names (not nice, as in Java actually fields are starting in lowercase starting, but working nevertheless)

so somthing like

private String Start = "initialFieldValueForStart";

just give it a try....

otherwise try to refactor the jrxmls

hth + regards

C-Box

C-Box's picture
2250
Joined: Jul 19 2006 - 5:58pm
Last seen: 1 week 2 days ago
0

Thanks. Capital letter does not solve the issue unfortunatelly. 

rmikhaylenko's picture
Joined: Nov 19 2019 - 1:06am
Last seen: 1 week 2 days ago
Feedback