davidn Posted March 14, 2010 Share Posted March 14, 2010 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 XWhen 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 More sharing options...
thangalin Posted March 15, 2010 Share Posted March 15, 2010 You can also use PrintWhenExpression. Usually converting the data to another format outside of JasperReports is a mistake. Keep your data pure; let the viewing layer (JasperReports) handle how to properly display the data. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now