augarte Posted March 21, 2011 Share Posted March 21, 2011 Hi,I want to print the background of the cells in my report. The logic for printing the cells is not based in the values that are shown in these cells. I use an xml datasource and the information about the background color of each cell is stored in the xml file as an attribute. I have been searching if there is any posibility for doing that but didn't found nothing. I have previously used conditional styles but this functionality applies conditional formating for each column, and I need to do it for each cell. Thanks in advance.Kind regards,Aitor. Link to comment Share on other sites More sharing options...
augarte Posted March 24, 2011 Author Share Posted March 24, 2011 Nobody knows if this is possible? Link to comment Share on other sites More sharing options...
Raphaël Peguet Posted June 28, 2011 Share Posted June 28, 2011 Hi Augarte,Have you tried to use a Frame behind your cell in detail band and do a print when expression?I would add several Frames with the color you wish and opaque at the back of each cell that you want to have a conditional backgroud color and then update the print When Expression property of the Frame to have it displayed or not depending on your data in the xml datasource. Be carefull to send the Frames of different color to the back so that It doesn't hide your data.Hope that help,Raphael. Link to comment Share on other sites More sharing options...
Raphaël Peguet Posted June 29, 2011 Share Posted June 29, 2011 With the previous methode I have successful output but not in all format, Excel doesn't seem to show the background color.Another way to do it and prbably better would be to create a new Style (right click Styles in the report inspector) and then add your conditional Styles with right click on your Style name. Each conditional style have a big set of properties for font color etc... The expression should return a Boolean so you may need enter something like "New Boolean($P{param1}>yourValue)" then this style will be aplied when param1 is higher than yourValue. This is an example, you have a big flexibility there.Raphael--Please increase my Karma if it helped 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