Jump to content
We've recently updated our Privacy Statement, available here ×

String to Boolean conversion - 0/1 to false/true


davidn

Recommended Posts

Hi,

 

New to iReports so please excuse the simplicity of this question.

I've run an SQL to get data and this returns unsigned tiny int values (0,1) from a MySQL database (5.x)

Using Ireports I create a field list which is of string type. Within the SQL I use case to convert the 0,1 to '' or X

When the report is run the output is on '' or X as wanted but true or false for each field.

the field names in the DB are exc00[x] and the fields in iReports are E00[x] so I'm not sure where it's getting confused...

 

Any input in general behaviour of JRXML and iReports when type casting or doing this type of conversion owuld be appreciated.

Thanks.

Dave

 ps. the main purpose of this is to indicate with a 'X' or some kind of mark within the report to show that the field is marked/active whatever. If there is a simple way to use iReports to convert a 0,1 tiny int field result I'm open to suggestions.

 

 

 

Code:


Post Edited by davidn at 03/15/2010 03:08
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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