Page 1 of 1
Odd and even style for databand rows
Posted: Mon May 02, 2022 2:02 pm
by anli
Hello,
I want to print the background of a databand with different colors for odd and even rows. How can I achieve this alternate colors? I tried with Appearance - Odd style and Even style properties on the databand but didn't find out which expression to use (maybe e.Row % 2 == 0?) and how to set a solid brush of e. g. red and green.
How can I achieve this?
Thanks a lot for your help in advance!
Re: Odd and even style for databand rows
Posted: Tue May 03, 2022 9:16 am
by Lech Kulikowski
Hello,
You can use Conditions with the following expression:
(Line % 2 == 0)
Thank you.
Re: Odd and even style for databand rows
Posted: Tue May 03, 2022 10:00 am
by anli
Hello Lech,
thank you for your answer. How can I set the brush and the color?
Re: Odd and even style for databand rows
Posted: Tue May 03, 2022 1:35 pm
by Lech Kulikowski
Hello,
You can add Styles and apply the necessary style in the Conditions, or set the brush and the color in the Conditions.
Thank you.
Re: Odd and even style for databand rows
Posted: Tue May 03, 2022 3:02 pm
by anli
Hello Lech,
thanks a lot for your answer. Can you please provide an example code or link to documentation to show me how I can set the brush and the color in the conditions?
Thanks in advance!
Re: Odd and even style for databand rows
Posted: Wed May 04, 2022 3:33 pm
by Max Shamanov
Hello,
Please check the attached report.
Thank you.
Re: Odd and even style for databand rows
Posted: Fri May 06, 2022 11:41 am
by anli
Hello,
thank you! I needed a moment to find it but not it works well

Thanks a lot!
Re: Odd and even style for databand rows
Posted: Fri May 06, 2022 12:07 pm
by Max Shamanov
Hello,
You are welcome!
Re: Odd and even style for databand rows
Posted: Wed Mar 06, 2024 2:53 am
by eh13
Since databands have an oddstyle, why can't it reset with new groups so it doesn't require conditions?
Re: Odd and even style for databand rows
Posted: Fri Mar 08, 2024 1:52 pm
by HighAley
Hello,
This is a behavior of our tool by design.
There can be cases when this is important, for instance, when the group header is invisible.
Thank you.