Tuesday, March 20, 2012

backgroundcolor in groups

Hello,
There are 3 groups in my table. The second and third group are hidden and
can be drilled down. I have a code to set alternate color for backgroundcolor
of each rows (the first group). The code is "= iif(RunningValue(
Fields!uniqueID.Value, CountDistinct, Nothing) mod 2, "white", "yellow")".
However, some rows can not return alternate color. The report looks like that:
row1 (backgroundcolor is white)
row2 (backgroundcolor is yellow)
row3 (backgroundcolor is white)
row4 (backgroundcolor is white)
row5 (backgroundcolor is yellow)
Does anybody know how to set alternate color for groups?
Thanks!The RunningValue runs based on the details, but you are using the value to
determine the color of groups. If one group contains an even number of
details, the next group will have the same backgroundcolor as the previous
group.
At this point, there is no predefined aggregate function available that
would just count the groups. However, you may want to read this article
which explains the steps necessary to get this working:
http://blogs.msdn.com/chrishays/archive/2004/08/30/223068.aspx
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jean" <Jean@.discussions.microsoft.com> wrote in message
news:C44CDF74-4505-47C7-B7EB-F53F788698EF@.microsoft.com...
> Hello,
> There are 3 groups in my table. The second and third group are hidden and
> can be drilled down. I have a code to set alternate color for
backgroundcolor
> of each rows (the first group). The code is "= iif(RunningValue(
> Fields!uniqueID.Value, CountDistinct, Nothing) mod 2, "white", "yellow")".
> However, some rows can not return alternate color. The report looks like
that:
> row1 (backgroundcolor is white)
> row2 (backgroundcolor is yellow)
> row3 (backgroundcolor is white)
> row4 (backgroundcolor is white)
> row5 (backgroundcolor is yellow)
> Does anybody know how to set alternate color for groups?
> Thanks!
>
>|||Thanks for your help! It works after I change my code to
"= iif(RunningValue(Fields!uniqueID.Value & Fields!group1.Value,
CountDistinct, Nothing) mod 2, "white", "yellow")".
Jean
"Robert Bruckner [MSFT]" wrote:
> The RunningValue runs based on the details, but you are using the value to
> determine the color of groups. If one group contains an even number of
> details, the next group will have the same backgroundcolor as the previous
> group.
> At this point, there is no predefined aggregate function available that
> would just count the groups. However, you may want to read this article
> which explains the steps necessary to get this working:
> http://blogs.msdn.com/chrishays/archive/2004/08/30/223068.aspx
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Jean" <Jean@.discussions.microsoft.com> wrote in message
> news:C44CDF74-4505-47C7-B7EB-F53F788698EF@.microsoft.com...
> > Hello,
> >
> > There are 3 groups in my table. The second and third group are hidden and
> > can be drilled down. I have a code to set alternate color for
> backgroundcolor
> > of each rows (the first group). The code is "= iif(RunningValue(
> > Fields!uniqueID.Value, CountDistinct, Nothing) mod 2, "white", "yellow")".
> > However, some rows can not return alternate color. The report looks like
> that:
> >
> > row1 (backgroundcolor is white)
> > row2 (backgroundcolor is yellow)
> > row3 (backgroundcolor is white)
> > row4 (backgroundcolor is white)
> > row5 (backgroundcolor is yellow)
> >
> > Does anybody know how to set alternate color for groups?
> >
> > Thanks!
> >
> >
> >
> >
>
>sql

No comments:

Post a Comment