Wednesday, March 7, 2012

Column Totalling Question

I am trying to total a column and I am not sure how to do this.
I have an IIF statment in a textbox in my table in which subtracts 2
columns, sees if the calculated value is less than zero, and if the value is
less than zero display 0 else display the value. See Below
=IIF((MSRptISCClass.ISC.intGetSumORHours(Fields!EmployeeNumber.Value))-(MSRptISCClass.ISC.intGetORHoursLogged(Fields!EmployeeNumber.Value))
<
0,0,(MSRptISCClass.ISC.intGetSumORHours(Fields!EmployeeNumber.Value))-(MSRptISCClass.ISC.intGetORHoursLogged(Fields!EmployeeNumber.Value)))
What I want to do is take the sum of all these results in the footer of the
table but I cant wrap a Sum aggregate function around the above statement and
I cant use the running value function because it doesn't take in account the
negative values that I handle in the text box. ANY SUGGESTIONS!!!
DONI had a situation like this. I ended up creating total rows in a stored
procedure along with the other detail rows. To distinguish a row, I added a
rowtype column. I used the CASE statement within the stored procedure to
calc totals. Hope this helps!
"dillig" <dillig@.discussions.microsoft.com> wrote in message
news:B5BE15B7-817A-4755-8422-26D9A4C28896@.microsoft.com...
>I am trying to total a column and I am not sure how to do this.
> I have an IIF statment in a textbox in my table in which subtracts 2
> columns, sees if the calculated value is less than zero, and if the value
> is
> less than zero display 0 else display the value. See Below
> =IIF((MSRptISCClass.ISC.intGetSumORHours(Fields!EmployeeNumber.Value))-(MSRptISCClass.ISC.intGetORHoursLogged(Fields!EmployeeNumber.Value))
> <
> 0,0,(MSRptISCClass.ISC.intGetSumORHours(Fields!EmployeeNumber.Value))-(MSRptISCClass.ISC.intGetORHoursLogged(Fields!EmployeeNumber.Value)))
> What I want to do is take the sum of all these results in the footer of
> the
> table but I cant wrap a Sum aggregate function around the above statement
> and
> I cant use the running value function because it doesn't take in account
> the
> negative values that I handle in the text box. ANY SUGGESTIONS!!!
> DON

No comments:

Post a Comment