Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to make Table Row Alternate Color?
4robert
Hi All,
I have designed a table using birt-rcp-report-designer-2.3.2.
Can anyone tell me how to make table row alternate color?
I have already make it somehow but want to know if there is another way to do it.
So, write the different ways to do this.
**** Is it possible to make table row background color conditionally? I think there is no provision. It would have been nice if this was present.
Thanks in Advance!
Robert
Find more posts tagged with
Comments
mwilliams
Hi Robert,
I'm not sure how you did your alternating rows, but you can use a highlight rule to do so. Attached is a report that shows this. Also, you can conditionally highlight a row using highlight rules as well. Not sure if this is what you were meaning in your question, but an example of this is in the report also. The credit limits less than $10000 are in red and the ones over $200000 are in green. If this isn't what you mean, let me know.
4robert
Hi Michael,
Thanx for your prompt reply.
I have already made my report table alternate color using highlight rule.
Also I have done this with 2 details rows in a table and changing its "visibility" property depending upon condition.
It was just my query that if it is possible to make background color conditionally
from the properties window( it can be treated as a new feature of BIRT designer).
Thank you Again
Robert
mwilliams
Robert,
I guess I'm not quite understanding what you mean by conditionally changing the row color? Can you explain this more?
laulowen
Hi all,
Does anyone know how to achieve the same thing for grids (as opposed to tables?). I would like to set a single style for the whole grid, without having to maintain the row background colors individually.
Thanks!
Laura
mwilliams
Laura,
For a grid, I think you'll have to highlight each row individually since the rows of a grid are fixed, this should be easy enough.
laulowen
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="80592" data-time="1311691202" data-date="26 July 2011 - 07:40 AM"><p>
Laura,<br />
<br />
For a grid, I think you'll have to highlight each row individually since the rows of a grid are fixed, this should be easy enough.<br /></p></blockquote>
<br />
Thanks for your reply, Michael.<br />
<br />
I don't agree it's easy enough, though. Instead of setting a single style to a grid, one must define different styles and apply them to rows individually. That itself makes it more cumbersome to manage. And it eliminates the possibility of using BIRT predefined styles. Also, if ever one needs to add a row somewhere in between, all styles below it need to be changed manually.<br />
<br />
I'll do as you suggested because it's the only resource available for me, but I do believe it's far from optimal.<br />
<br />
Thanks again!<br />
Laura
mwilliams
Laura,
I'm sorry that I could not supply a better solution. Since a grid does not really have a row concept behind it like a table does, creating a highlight rule like that of a table doesn't work. You could always file an enhancement request for something like this to be available for grids. Maybe they'll show you a workaround to create a style like this that I'm not aware of?
http://www.birt-exchange.org/org/resources/bug-reporting/