Print When Expression

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: 4 months 1 week ago

4 Answers:

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

sanbez's picture
7142
Joined: Jan 11 2011 - 2:06am
Last seen: 2 years 11 months ago

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: 4 months 1 week 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 - 10 years 10 months ago

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
107
Joined: Sep 23 2009 - 2:08am
Last seen: 10 years 10 months ago

Look the lenguage report. 

dieguito28's picture
Joined: May 17 2011 - 6:12am
Last seen: 2 years 6 months ago
Feedback