Wednesday, March 28, 2012

RunningValue + Aggregate = ERROR?

I am trying to do alternative color row for my report,
1. On Table - it works
=iif(RowNumber(Nothing) Mod 2 , "#F9F9F9","#EBEBEB" )
2. On Matrix with Value - it works too
=iif(RunningValue(Fields!Name.Value, CountDistinct, Nothing) Mod 2,
"#EEEEEE", "#FFFFFF")
3. On Matrix with Aggregate function - it DOESN'T WORK
=iif(RunningValue(Fields!OrderAmount.Value, Sum, Nothing) Mod 2, "#EEEEEE",
"#FFFFFF")
=iif(RunningValue(Sum(Fields!OrderAmount.Value), CountDistinct, Nothing) Mod
2, "#EEEEEE", "#FFFFFF")
It said scope parameter is not for RunningValue?The "Nothing" scope is not supported in matrix cells - because otherwise it
is not clear if the RunningValue should run horizontally or vertically
through the matrix cells. The scope has to be a specific matrix row group or
column group.
In your case, it sounds like you want to achieve alternating colors for
matrix rows. Take a look at the following blog article:
http://blogs.msdn.com/chrishays/archive/2004/08/30/GreenBarMatrix.aspx
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Zean Smith" <nospam@.nospamaaamail.com> wrote in message
news:Wv2dnQkV7dBsD__eRVn-qw@.rogers.com...
>I am trying to do alternative color row for my report,
> 1. On Table - it works
> =iif(RowNumber(Nothing) Mod 2 , "#F9F9F9","#EBEBEB" )
> 2. On Matrix with Value - it works too
> =iif(RunningValue(Fields!Name.Value, CountDistinct, Nothing) Mod 2,
> "#EEEEEE", "#FFFFFF")
> 3. On Matrix with Aggregate function - it DOESN'T WORK
> =iif(RunningValue(Fields!OrderAmount.Value, Sum, Nothing) Mod 2,
> "#EEEEEE", "#FFFFFF")
> =iif(RunningValue(Sum(Fields!OrderAmount.Value), CountDistinct, Nothing)
> Mod 2, "#EEEEEE", "#FFFFFF")
> It said scope parameter is not for RunningValue?
>
>

No comments:

Post a Comment