2001 JI Open Discussion Posted August 21, 2006 Share Posted August 21, 2006 By: apratimk - apratimk Please Please help teodord its urgent !!! 2005-01-31 21:11Hello , I am developing the report in which i want to change the backgrouond and foreground colour of the field dynamically depending on the contents of the field . I have partially suceeded in that in a manner that i can change the colour dynamically at runtime by using following code JRElement[] jrElements = jasperReport.getDetail().getElements(); for(int i =0;i<jrElements.length;i++) { JRElement jrElement = jrElements; jrElement.setForecolor(Color.Decode("#8B0000")); jrElement.setBackcolor(Color.Decode("#0000CD")); }//for But i want to change the color depending on the containts of the field or element . What is the way to read the containts of the field at runtime.. Please help me in this regard. By: C-Box - c-box RE: Please Please help teodord its urgent !! 2005-02-01 00:59Perhaps a scriptlet could help you, that calculates the fore- & backgroundColor for the needed fields in it's method afterdetaileval. hth C-Box 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