Jump to content
We've recently updated our Privacy Statement, available here ×

conditional expression AND


driu

Recommended Posts

hello guys i have a problem with my report..

on my print when expression i have this

   $F{TIPO_INCASSO}.equals("2")? new Boolean(true) : new Boolean(false)

since i want to add another condition..! and i want to become like this:

$F{TIPO_INCASSO}.equals("2")? new Boolean(true) : new Boolean(false) && $F{TIPO_1}.equals("C")? new Boolean(true) : new Boolean(false)

 

im encountering an error

The operator && is undefined for the argument type(s) Boolean, boolean                 value = (java.lang.Boolean)(new Boolean(((java.lang.String)field_TIPO_INCASSO.getValue()).equals("2")? new Boolean(true) : new Boolean(false) && ((java.lang.String)field_TIPO_1.getValue()).equals("C")? new Boolean(true) : new Boolean(false)));//$JR_EXPR_ID=28$

 

Any help would be appreciated..

 

Thanks in advance

Driu

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Try:

       $F{TIPO_INCASSO}.equals("2") && $F{TIPO_1}.equals("C") ?
        Boolean.TRUE : Boolean.FALSE

Or even:

      new Boolean( $F{TIPO_INCASSO}.equals("2") && $F{TIPO_1}.equals("C") )

--

Read chapter 15 of Indispensable, a book on JasperReports, available at:

http://www.whitemagicsoftware.com/books/indispensable/



Post Edited by thangalin at 06/14/2011 11:22
Link to comment
Share on other sites

Thank you smo much for your answer.. it works fine..!!!

 

would you mind if i ask u another question??

i have 2 column both numeric i want to concatenate and wrap the second column..

example

price1 || "\n"|| price2

Question:

what is the oracle function that allows me to wrap the second column??

 

Thx in andvance

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...