Jump to content
Changes to the Jaspersoft community edition download ×

printWhenExpression compare String values


2005 IR Help

Recommended Posts

By: johnnytmac - johnme14

printWhenExpression compare String values

2004-12-16 07:35

I'm having a bit of trouble comparing two string values using the printWhenExpression tag. I have a field that returns either a "Y" or "N" string value. the expression I had tired was

 

<printWhenExpression><![CDATA[new Boolean($F{FIELD_!}.equalsIgnoreCase("N"))]]></printWhenExpression>

 

or

 

<printWhenExpression><![CDATA[new Boolean($F{WIF_ADDL_SHEETS}.equalsIgnoreCase("Y"))]]></printWhenExpression>

 

It doesn't throw an error yet I can't get a value to print out either. Any suggestions?

 

 

 

 

By: johnnytmac - johnme14

RE: printWhenExpression compare String values

2004-12-16 07:41

that should have been......

 

<printWhenExpression><![CDATA[new Boolean($F{WIF_ADDL_SHEETS}.equalsIgnoreCase("N"))]]></printWhenExpression>

 

or

 

<printWhenExpression><![CDATA[new Boolean($F{WIF_ADDL_SHEETS}.equalsIgnoreCase("Y"))]]></printWhenExpression>

 

and after stepping through the code it seems that whether WIF_ADDL_SHEETS = "Y" or "N" the boolean value is always false.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...