Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Runningvalues

Author  Topic 

nhell
Starting Member

6 Posts

Posted - 2009-04-13 : 02:40:12
Hello. Can anyone help me with this?

Date--------Movementtype---In-----Out----OnHand
03/29/09----Receive--------20------0-------55
03/28/09----TransferOUT-----0-----10-------35
03/23/09----TransferOUT-----0------5-------45
03/22/09----Adjustment----(50)-----0-------50
03/21/09----Receive--------20------0------130
03/20/09----TransferOut-----0-----20------110
03/19/09----Receive--------30------0------130
03/18/09----Adjustment---(100)-----0------100
03/16/09----Receive--------10------0-------10

I have a procedure arrange in descending order by date, it selects all transactions made by an item in warehouse. [In] is the quantity received and out is the quantity removed from the storage. "OnHand" is a calculated value. I use this expression on "OnHand":

=Sum(Fields!In.Value)-Sum(Fields!Out.Value)-RunningValue(Fields!In.Value, Sum,Nothing)+RunningValue(Fields!Out.Value, Sum, Nothing)+Fields!In.Value-Fields!Out.Value

I got wrong results because I only manage to get the running value of the "OnHand" column. The tricky part is the "Adjustment" value of "Movement Type" column. I just want to know if the possibility of doing this in reporting services is higher than getting the value in SQL server.

Regards,
Nhell
   

- Advertisement -