shwe Posted May 26, 2007 Share Posted May 26, 2007 I have got a table with field names "print_field" and "field_name" where print_field contains a boolean value (true/false) and field_name contains a field name. Now in iReports I want to hide the field which has the "print_field" value false (i.e. value in the print_field field is false) How can I write conditional statement to check the field_name name and value in print_field field. Here is how the database is: field_name print_field-------------------------------------cust_id truecust_name truecust_email false Now I've placed a text field in iReports I want to hide all fields with print_field value false.Post edited by: shwe, at: 2007/05/27 13:08 Link to comment Share on other sites More sharing options...
codyjasperForge Posted July 5, 2007 Share Posted July 5, 2007 In your textfield -> print When Expression type the following: new Boolean (!$F{print_field}.equals(Boolean.FALSE) ?) It will return 'false'(won't print) if print_field=false;It will return 'true'(and print) if print_field=true; 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