pradiptab Posted April 18, 2011 Share Posted April 18, 2011 Hello Friends, I am using iReport 3.7.1. Is there any option to show a field as a check box or as a checkbox group ? As a newbie I might missing some thing to achieve this. Please help. Thanks,PradiptaPost Edited by pradiptab at 04/18/2011 11:47 AM Link to comment Share on other sites More sharing options...
patobarrientos Posted April 18, 2011 Share Posted April 18, 2011 Hi, Pradipta.Are you printing to PDF format?What I do to get this done is set an image showing a checkbox, and sometimes 2 images (checkbox checked and unchecked).Then I set conditions to show the propper one.check the images attached.Good luck. /Pato Link to comment Share on other sites More sharing options...
pradiptab Posted April 19, 2011 Author Share Posted April 19, 2011 Thanks Pato. This works fine. And Yes I am printing to pdf format.But still I am wondering if there is any inbuilt way to implement check boxes for a group of dynamic items inside iReport. Thanks,PradiptaPost Edited by pradiptab at 04/19/2011 11:53 AM Link to comment Share on other sites More sharing options...
valluri88 Posted April 19, 2011 Share Posted April 19, 2011 Hi Guys,Can u paste the sample code that you used to get the functionality. I'm new to jasper reports and this will help me. Thanks and regards,valluri Link to comment Share on other sites More sharing options...
pradiptab Posted April 19, 2011 Author Share Posted April 19, 2011 Hi Valluri- Place these two images in your report directory.- Place an Image field from the pallette.- In the "Image expression" property of that field use this sample code.(${field_name}.intValue() == 1 ? "path\\to\\your\\image\\showing\\check.jpg" : "path\\to\\your\\image\\showing\\uncheck.jpg")Where "field_name" is a Number type field in my case. Hope this will help. Thanks,Pradipta Link to comment Share on other sites More sharing options...
valluri88 Posted April 20, 2011 Share Posted April 20, 2011 thanks pradipta.it worked.. :) Link to comment Share on other sites More sharing options...
reparacentro Posted June 3, 2020 Share Posted June 3, 2020 ($F{field}.intValue() == 1 ? "Contado "+"u2611"+" Crédito "+"u2610" : "Contado "+"u2610"+" Crédito "+"u2611") 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