Showing posts with label field. Show all posts
Showing posts with label field. Show all posts

Friday, March 30, 2012

Restrict ing Sum(...) in Report Table Footer?

Hello,
My Report Table contains a Date Field and a numeric Value field. In the
Footer row of the table I use the Sum Aggregate function to sum up all the
values for all the rows that get displayed
=sum(Fields!CountFld.Value)
I also have an conditional Expression for the background color of each cell
in the detail row
=iif(Parameters!EndDate.Value > Fields!
CurExpireDate.Value, "Gainsboro", "White")
which changes the background color of each cell in the row (I add this IIF
expression to each field in the row).
So, if a value is in a row that is the gainsboro color, I do not want to sum
that value. Is there a way to restrict sum(Fields!CountFld.Value) ?
PseudoCode
=Sum(iif(Parameters!EndDate.Value > Fields!
CurExpireDate.Value, Fields!CountFld.Value, 0))
something like this?
Thanks,
RichWell, I tried my own pseudocode and it worked!
=Sum(iif(Parameters!EndDate.Value > Fields!
> CurExpireDate.Value, 0, Fields!CountFld.Value))
I just had to change the values around
"Rich" wrote:
> Hello,
> My Report Table contains a Date Field and a numeric Value field. In the
> Footer row of the table I use the Sum Aggregate function to sum up all the
> values for all the rows that get displayed
> =sum(Fields!CountFld.Value)
> I also have an conditional Expression for the background color of each cell
> in the detail row
> =iif(Parameters!EndDate.Value > Fields!
> CurExpireDate.Value, "Gainsboro", "White")
> which changes the background color of each cell in the row (I add this IIF
> expression to each field in the row).
> So, if a value is in a row that is the gainsboro color, I do not want to sum
> that value. Is there a way to restrict sum(Fields!CountFld.Value) ?
> PseudoCode
> =Sum(iif(Parameters!EndDate.Value > Fields!
> CurExpireDate.Value, Fields!CountFld.Value, 0))
> something like this?
> Thanks,
> Rich
>|||I used the same method, but have run into 1 problem. If the table or group
spans multiple pages, the sum fails (I get #Error). Not sure if you'll
encounter this, but I thought I would make you aware of my issue using that
method.
Michael
"Rich" wrote:
> Well, I tried my own pseudocode and it worked!
> =Sum(iif(Parameters!EndDate.Value > Fields!
> > CurExpireDate.Value, 0, Fields!CountFld.Value))
> I just had to change the values around
>
> "Rich" wrote:
> > Hello,
> >
> > My Report Table contains a Date Field and a numeric Value field. In the
> > Footer row of the table I use the Sum Aggregate function to sum up all the
> > values for all the rows that get displayed
> >
> > =sum(Fields!CountFld.Value)
> >
> > I also have an conditional Expression for the background color of each cell
> > in the detail row
> >
> > =iif(Parameters!EndDate.Value > Fields!
> > CurExpireDate.Value, "Gainsboro", "White")
> >
> > which changes the background color of each cell in the row (I add this IIF
> > expression to each field in the row).
> >
> > So, if a value is in a row that is the gainsboro color, I do not want to sum
> > that value. Is there a way to restrict sum(Fields!CountFld.Value) ?
> >
> > PseudoCode
> > =Sum(iif(Parameters!EndDate.Value > Fields!
> > CurExpireDate.Value, Fields!CountFld.Value, 0))
> >
> > something like this?
> >
> > Thanks,
> > Rich
> >|||Thanks. Not the kind of surprises I am looking forward to. Hopefully, I
won't run into that problem, but if I do, I will now know that I am not
alone. This is actually quite encouraging because I have had some seroius
heartaches with RS (2000).
"Michael C" wrote:
> I used the same method, but have run into 1 problem. If the table or group
> spans multiple pages, the sum fails (I get #Error). Not sure if you'll
> encounter this, but I thought I would make you aware of my issue using that
> method.
> Michael
> "Rich" wrote:
> > Well, I tried my own pseudocode and it worked!
> >
> > =Sum(iif(Parameters!EndDate.Value > Fields!
> > > CurExpireDate.Value, 0, Fields!CountFld.Value))
> >
> > I just had to change the values around
> >
> >
> >
> > "Rich" wrote:
> >
> > > Hello,
> > >
> > > My Report Table contains a Date Field and a numeric Value field. In the
> > > Footer row of the table I use the Sum Aggregate function to sum up all the
> > > values for all the rows that get displayed
> > >
> > > =sum(Fields!CountFld.Value)
> > >
> > > I also have an conditional Expression for the background color of each cell
> > > in the detail row
> > >
> > > =iif(Parameters!EndDate.Value > Fields!
> > > CurExpireDate.Value, "Gainsboro", "White")
> > >
> > > which changes the background color of each cell in the row (I add this IIF
> > > expression to each field in the row).
> > >
> > > So, if a value is in a row that is the gainsboro color, I do not want to sum
> > > that value. Is there a way to restrict sum(Fields!CountFld.Value) ?
> > >
> > > PseudoCode
> > > =Sum(iif(Parameters!EndDate.Value > Fields!
> > > CurExpireDate.Value, Fields!CountFld.Value, 0))
> > >
> > > something like this?
> > >
> > > Thanks,
> > > Rich
> > >sql