azmi2 Posted March 8, 2009 Share Posted March 8, 2009 i am using ireport 2.5.i make a report for order tracking.i tried to make some condition,but it is not working in ireport,but when i run this parameters in navicat,it is running welll. detail: i have two date fileds penalty_start_from and expected _delivery_date , i put three condition Red: if penalty_start_from - expected_delivery_date < 0Green: if penalty_start_from - expected_delivery_date > 14Yellow: if penalty_start_from - expected_delivery_date > 0 < 14please tell me how could i display these colors on report one the condition met. thanks for help Code:Red: if penalty_start_from - expected_delivery_date < 0Green: if penalty_start_from - expected_delivery_date > 14Yellow: if penalty_start_from - expected_delivery_date > 0 < 14 Link to comment Share on other sites More sharing options...
kchaudhry Posted March 11, 2009 Share Posted March 11, 2009 I have done something similar in the past. What I did was created a style with different colors based on the calculation results. Created a frame and put all my fields in that frame and then applied that style to the frame. Here is an example of what I did for one of the style conditions (yellow color). new Boolean(((new Date().getTime() - $F{PaymentDueDate}.getTime())/86400000) >= 15&& ((new Date().getTime() - $F{PaymentDueDate}.getTime())/86400000) <= 30)Note that under the style that you are creating for each color you will have to do a new "style condition".Hope this helps! Link to comment Share on other sites More sharing options...
azmi2 Posted April 25, 2009 Author Share Posted April 25, 2009 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