Odd and even style for databand rows
Odd and even style for databand rows
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!
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!
Best regards, André
-
- Posts: 6426
- Joined: Tue Mar 20, 2018 5:34 am
Re: Odd and even style for databand rows
Hello,
You can use Conditions with the following expression:
(Line % 2 == 0)
Thank you.
You can use Conditions with the following expression:
(Line % 2 == 0)
Thank you.
Re: Odd and even style for databand rows
Hello Lech,
thank you for your answer. How can I set the brush and the color?
thank you for your answer. How can I set the brush and the color?
Best regards, André
-
- Posts: 6426
- Joined: Tue Mar 20, 2018 5:34 am
Re: Odd and even style for databand rows
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.
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
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!
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!
Best regards, André
-
- Posts: 824
- Joined: Tue Sep 07, 2021 10:11 am
Re: Odd and even style for databand rows
Hello,
Please check the attached report.
Thank you.
Please check the attached report.
Thank you.
- Attachments
-
- ReportCondition.mrt
- (206.31 KiB) Downloaded 325 times
Re: Odd and even style for databand rows
Hello,
thank you! I needed a moment to find it but not it works well Thanks a lot!
thank you! I needed a moment to find it but not it works well Thanks a lot!
Best regards, André
-
- Posts: 824
- Joined: Tue Sep 07, 2021 10:11 am
Re: Odd and even style for databand rows
Hello,
You are welcome!
You are welcome!
Re: Odd and even style for databand rows
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
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.
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.