Jump to content
JasperReports Library 7.0 is now available ×

Type Casting Problem


2006 IR Open Dicussion

Recommended Posts

By: Dharmendra Sharma - dkumar_sharma

Type Casting Problem

2006-02-14 14:28

Hi All,

 

((((java.lang.String)$F{LNUM}).equals("0"))?$F{PARTID}:"")

 

I am using above condition on one of the filed,

here LNUM is double and PARTID is string

 

 

I getting a error like...

 

found : java.lang.Double required: java.lang.String

value = (java.lang.String)(((((java.lang.String)((java.lang.Double)field_LNUM.getOldValue())).equals("0"))?((java.lang.String)field_PARTID.getOldValue()):""));

 

Please some one help me out on this, its realy urgent.

 

thanks & regards,

dkumar_sharma

 

 

 

 

 

By: TBG - thebiggunner

RE: Type Casting Problem

2006-02-15 03:57

Hi.

 

Try this. This could be the solution.

 

(String.valueOf($F{LNUM}}).equals("0")?$F{PARTID}:"")

 

 

 

 

By: Giulio Toffoli - gt78

RE: Type Casting Problem

2006-02-15 14:43

(($F{LNUM}.doubleValue() == 0) ? $F{PARTID} : "" )

 

giulio

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