0

I have a report with a subreport inside.

This subreport have property "Print when expresion" activated (a simple expression $field == string). It works fine, but if i change the "language" property in main report from "groovy" to "java", the subreport never appears

(I'm using IReports 5.6.0)

Petter Friberg
  • 21,252
  • 9
  • 60
  • 109
rankrb
  • 57
  • 1
  • 4

1 Answers1

0

With you will compare two String's using ==

see Groovy - How to compare the string?

Instead in you need to use .equals(), $field.equals(string)

see How do I compare strings in Java?

Community
  • 1
  • 1
Petter Friberg
  • 21,252
  • 9
  • 60
  • 109