Jump to content
Changes to the Jaspersoft community edition download ×

How to set value = "" if $F{SNAME}==null


2005 IR Help

Recommended Posts

By: Dharmendra Sharma - dkumar_sharma

How to set value = "" if $F{SNAME}==null

2005-05-26 06:31

Hi All

 

How to set display value="" if $F{SNAME} == null.

 

Below is the example how i am using the fields in one text box

$F{SNAME}+"n"+

$F{SADDR1}+"n"+

$F{SADDR2}+"n"+

$F{SCITY}+"n"+

$F{SSTATE}+" "+$F{SCOUNTRY}

 

here i have to set "" for all fields which may have null values.

whether the "Print When Expression" of iReport will be helpfull, if yes then how? pls some one help me out.

 

thanks & regards,

dkumar_sharma

 

 

 

 

By: Giulio Toffoli - gt78

RE: How to set value = "" if $F{SNAME}==null

2005-05-26 07:02

( ($F{SNAME} != null) ? $F{SNAME} : "") +"n"+

( ($F{SADDR1} != null) ? $F{SADDR1} : "") +"n"+

( ($F{SADDR2} != null) ? $F{SADDR2} : "") +"n"+

( ($F{SCITY} != null) ? $F{SCITY} : "") +"n"+

( ($F{SSTATE} != null) ? $F{SSTATE} +" ": " ") +

( ($F{SCOUNTRY} != null) ? $F{SCOUNTRY} : "")

 

 

 

 

 

By: Dharmendra Sharma - dkumar_sharma

RE: How to set value = "" if $F{SNAME}==null

2005-05-26 07:40

Its working fine now after implementing this.

thanks a lot Giulio

 

 

 

 

By: kootjekip - kootjekip

RE: How to set value = "" if $F{SNAME}==null

2005-05-30 05:37

some times you will need the real value eg.

 

(($F{sname}!=null || $F{sname}!="")?$F{sname}:"")+"n" +....

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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