Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how do i get opening balance from previous day closing balance.

here is the example

date 14/2/2013 closingbalance 2000

date 15/2/2013 opening balance 2000

credit 2000
debit 500
date 15/2/2013 closingbalance 3500

date 16/2/2013 opening balance 3500 and so on

here previous closing balance become opening balance.

problem is that i have to show data between date and no idea how to get opening balance of first record.

i am using sqlser 2005 and crystal report 10.
Posted
Comments
Sergey Alexandrovich Kryukov 1-Feb-14 18:59pm    
The question does not make much sense. It all depends on how you design your code and data structures.
—SA

1 solution

I think you need to consider the closing day time AND date, eg 01-01-2014 23:59:59

Then the same with the opening day balance as, say 01-02-2014 00:00:00

Then they should be the same.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900