I have a table that lists both "Buy" and "Sell" orders. I want to display a
SUM of all Buys and a SUM of all Sells in the footer. Is there a way to
conditional SUM the rows based on a column value in reporting?
Thanks,
JeffOn Apr 30, 11:22 am, Jeff Tu <Jef...@.discussions.microsoft.com> wrote:
> I have a table that lists both "Buy" and "Sell" orders. I want to display a
> SUM of all Buys and a SUM of all Sells in the footer. Is there a way to
> conditional SUM the rows based on a column value in reporting?
> Thanks,
> Jeff
Generally, accessing table control data in a footer is very
restrictive. You can either try to access the datasets directly or
access the dataset(s) via hidden parameters. You might be able to
access the dataset from the footer w/: =iif(Max(Fields!
SomeFieldName.Value, "SomeDataSetName") = "Buy", Sum(Fields!Buy.Value,
"SomeDataSetName"), Sum(Fields!Sell.Value, "SomeDataSetName"))
-or-
=iif(Parameters!SomeParameterName.Value = "Buy", Sum(Parameters!
Buy.Value), Sum(Parameters!Sell.Value))
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Thank you for your reply. Unfortunately, the example you provided would not
work for me. To apply your first example to my case, it would read like this:
=iif(Max(Fields!SomeFieldName.Value, "SomeDataSetName") = "Buy",
Sum(Fields!Quantity.Value, "SomeDataSetName"), Sum(Fields!Quantity.Value,
"SomeDataSetName"))
This obviously would NOT work since I only have one Quantity column, nor
would it work if I put a value of zero for the false condition.
As for your second example, I do not see how summing up parameters would
help when what I need is summing up of row values. Perhaps you can elaborate
on this?
"EMartinez" wrote:
> On Apr 30, 11:22 am, Jeff Tu <Jef...@.discussions.microsoft.com> wrote:
> > I have a table that lists both "Buy" and "Sell" orders. I want to display a
> > SUM of all Buys and a SUM of all Sells in the footer. Is there a way to
> > conditional SUM the rows based on a column value in reporting?
> >
> > Thanks,
> > Jeff
>
> Generally, accessing table control data in a footer is very
> restrictive. You can either try to access the datasets directly or
> access the dataset(s) via hidden parameters. You might be able to
> access the dataset from the footer w/: =iif(Max(Fields!
> SomeFieldName.Value, "SomeDataSetName") = "Buy", Sum(Fields!Buy.Value,
> "SomeDataSetName"), Sum(Fields!Sell.Value, "SomeDataSetName"))
> -or-
> =iif(Parameters!SomeParameterName.Value = "Buy", Sum(Parameters!
> Buy.Value), Sum(Parameters!Sell.Value))
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>
No comments:
Post a Comment