How to calculate opening balance?


  • Hi, I need to calculate the opening balance for an item. I m using a temp table to create the crystal report my table structure is as follows:
    Table Structure: ItemID, Opening, Purchase, Issued, Closing
    The above structure is wrong because i m using opening for each row. 
    I want to calculate the opening balance for an item if user select date ranges from 1/3/20011 upto 30/03/2011.
    If the CLOSING of an item is 11 in the end of march then it should the opening for an item for the begining of April. and so on.
    Please help me to achieve this.

    Monday, August 01, 2011 7:17 AM


  • Hello,

    This is SQL Server Integration Services(SSIS) Forum, SSIS is an ETL(Extract, Transform and Load) Tool, Please ask your question on Crystal Report Forum if exists to get better help. 

    If your question is related to Query then please ask your question on Transact SQL forum.



    • Marked as answer by Eileen Zhao Tuesday, August 09, 2011 10:27 AM
    Monday, August 01, 2011 7:42 AM

All replies