Jump to content
Changes to the Jaspersoft community edition download ×

How to test a Byte??


2004 IR Help

Recommended Posts

By: mab - maborou

How to test a Byte??

2004-09-16 08:22

Hi!!

I want to test a Byte and I don't know how to do it !!

 

I tried $F{MyField} != '0' where $F{MyField} is Byte, but it doesn't work!!

help me please!!!

 

thanks!!!

 

 

 

 

 

By: Andrew McLaughlin - pik0

RE: How to test a Byte??

2004-09-16 08:42

Because Byte is a class and not a primitive type, you have to test it like this:

 

! new Byte( 0 ).equals( $F{ MyField } )

 

Note that placement of the constant value (new Byte( 0 )) to the left of the equals. This prevents null pointer exceptions if MyField does not get assigned properly.

 

Piko

 

 

 

 

By: mab - maborou

RE: How to test a Byte??

2004-09-17 05:17

 

I doesn't work correctly but it makes me on the right way!! I've modified what you tell me and it works very well now!!!

 

Thank 4 all Pico!!!!!!

 

 

 

 

By: Andrew McLaughlin - pik0

RE: How to test a Byte??

2004-09-17 07:24

Glad to help. iReport and Java require a slightly different way of thinking. Once you get there, you realize the great power of both... :)

 

Piko

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