Jump to content
Changes to the Jaspersoft community edition download ×

isBalnkWhenNull


2005 IR Help

Recommended Posts

By: Manish Hatwalne - manish_hatwalne

isBalnkWhenNull

2004-02-26 01:37

I have a textfield expression which is a combination of two fields. Say number and name. Now I want "number" to be blank when it is null. So I added this attribute to my textField tag. However I still get "null" when number is null.

 

My expression is -

<textFieldExpression class="java.lang.String"> $F{number} + " " + $F{streetnum}</textFieldExpression>

 

How can I get this to print blank when number is null?

 

TIA,

- Manish

 

 

 

 

By: David Lim - aberrant80

RE: isBalnkWhenNull

2004-02-26 02:52

assuming number is an object and that you mean "if number is null, print an empty string", how about:

 

<textFieldExpression class="java.lang.String">

$F{number} + " == null ? "" : " +$F{Number} + " " + $F{streetnum}

</textFieldExpression>

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