diptypatil Posted July 25, 2008 Share Posted July 25, 2008 Hi All ,I would like to chnage the font of some text based on som econdition like :if (col1 == "Account Type"){then do something}I am using JasperDesign class and not .jrxml file . This very urgent can u pls suggest . Link to comment Share on other sites More sharing options...
lucianc Posted July 25, 2008 Share Posted July 25, 2008 Use conditional styles. See JRDesignStyle.addConditionalStyle() for an API entry point. Regards,Lucian Link to comment Share on other sites More sharing options...
diptypatil Posted July 25, 2008 Author Share Posted July 25, 2008 Hi ,Thanks a lot . This is what i have done :JRDesignStyle style = new JRDesignStyle(); JRDesignConditionalStyle a = new JRDesignConditionalStyle(); a.setBackcolor(MyJasperReport.getColor("#666666")); style.addConditionalStyle(a);Can u tell us how do we use if condition and compare the column value i.eif(col1 == "Account Type"){the above condition JRDesignConditionalStyle i will put here.}But how do write the If loop.ThanksDipty. Link to comment Share on other sites More sharing options...
diptypatil Posted July 25, 2008 Author Share Posted July 25, 2008 Hi ,Thanks a lot . This is what i have done :JRDesignStyle style = new JRDesignStyle(); JRDesignConditionalStyle a = new JRDesignConditionalStyle(); a.setBackcolor(MyJasperReport.getColor("#666666")); style.addConditionalStyle(a);Can u tell us how do we use if condition and compare the column value i.eif(col1 == "Account Type"){the above condition JRDesignConditionalStyle i will put here.}But how do write the If loop.ThanksDipty. Link to comment Share on other sites More sharing options...
diptypatil Posted July 25, 2008 Author Share Posted July 25, 2008 Hi Lucian,To my previous post i would like to add , As we can use new Boolean($F{AMOUNT}.intValue() > 10000)how can we do String comparision.?Please could u help us this is urgent.thanksdipty Link to comment Share on other sites More sharing options...
diptypatil Posted July 25, 2008 Author Share Posted July 25, 2008 Hi Lucian,To my previous post i would like to add , As we can use new Boolean($F{AMOUNT}.intValue() > 10000)how can we do String comparision.?Please could u help us this is urgent.thanksdipty 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