all groups > sql server reporting services > september 2004 >
You're in the

sql server reporting services

group:

Is this doable?


Is this doable? Sean
9/24/2004 1:53:08 PM
sql server reporting services: On the report table, there are 3 fields called Beginning Amount, Used Amount
and Remaining Amount respectively. The Beginning Amount and Used Amount field
are retrieved from the SQL database, while the Remaining Amount needs to be
calculated from the previous record, e.g, ItemB's RemainingAmount = ItemA's
RemainingAmount - ItemB's UsedAmount. Basides subreport and global variable,
is there any easy way to do it? what is a good approach here?


Example,

Beginning Amount: $1000

==============================================
Name Used Amount Remaining Amount
==============================================
Item A 100 900
Item B 200 700
Item C 100 600

Thanks.
Shawn

Re: Is this doable? Robert Bruckner [MSFT]
9/24/2004 5:45:34 PM
Yes it is doable with the RunningValue function.
See BOL:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rscreate/htm/rcr_creating_expressions_v1_5tt1.asp

The remaining amount would be e.g.:
= 1000 - RunningValue(Fields!Amount.Value, Sum, Nothing)

--
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

Re: Is this doable? Imad Merkeza
11/24/2004 9:21:20 AM
[quoted text, click to view]
AddThis Social Bookmark Button