Print When Expression

0

Hi all,

i am new to Jasper and would like to control the table rows with "print when expression"

There is already an expression in this field:
$V{REPORT_COUNT}.intValue() % 2 == 1 ? Boolean.TRUE : Boolean.FALSE

Now i would like to insert another choice. There is a var called "yavisieren". Its a boolean var. How do I insert it in the statement?

$V{REPORT_COUNT}.intValue() % 2 == 1 & $F{yavisieren} ? Boolean.TRUE : Boolean.FALSE (that doesn't work)

Can you help me?

h.steinbach's picture
Joined: Nov 27 2012 - 1:55am
Last seen: 2 years 5 days ago

4 Answers:

1

"yavisieren" is a variable?  Then use $V instead $F
And replace & to &&
Result: $V{REPORT_COUNT}.intValue() % 2 == 1 && $V{yavisieren}

sanbez's picture
830
Joined: Jan 11 2011 - 2:06am
Last seen: 1 week 46 min ago
0

Sorry it is a field:

I used && but then i get following error:

FOP: Fehler beim Bearbeiten eines JasperReport-Layouts (/tmp/XJASPERLAY3423723798256680252.TMP) aufgetreten:
  Errors were encountered when compiling report expressions class file:
1. The operator && is undefined for the ar

h.steinbach's picture
Joined: Nov 27 2012 - 1:55am
Last seen: 2 years 5 days ago

1. The operator && is undefined for the ar...
Give more stack trace. This message inappropriate arguments. In this message give info about current type arguments in operator &&

sanbez - 7 years 3 months ago
0

Hello there,

try... " ... $V{REPORT_COUNT}.intValue() % 2 == 1 && $V{yavisieren}.booleanValue()==true "

resp.: as a Field instead of a Variable $F ...

 

eazydi's picture
5
Joined: Sep 23 2009 - 2:08am
Last seen: 7 years 2 months ago
0

Look the lenguage report. 

dieguito28's picture
Joined: May 17 2011 - 6:12am
Last seen: 1 year 5 months ago
Feedback