Hi,
I have one table named "Ledger". as follows ....

acccode ---------- vdate ---------- amount----------drcr
---------------------------------------------------------------------
101---------------02/4/03-----------2000.00------------D
103---------------11/4/03-----------3000.00------------C
102---------------12/4/03-----------2500.00------------D
103---------------05/5/03-----------2000.00------------D
103---------------21/5/03-----------3500.00------------D
101---------------15/5/03-----------5000.00------------C
104---------------20/5/03-----------6000.00------------C


I want to generate the report in Crystal reports.
two parameters should be passed from vb...

the report format should be as follows.....


StartDate : 20/4/03
EndDate : 20/5/03

===========(A)============(B)============(C)=====
acccode----openingamount-------transactionamount-----balance
*********Debit-----Credit--------Debit-----Credit-----Debit---Credit
----------------------------------------------------------------------------------
101--------2000.00--------0-----------0------5000.00-->---0-----3000.00
102--------2500.00--------0-----------0---------0-------->-2500.00-----0--
103--------3000.00-------0------------0-------2000.00-->--1000.00-----0
104---------------0-------0-------------0--------6000.00-->---0----6000.00


[note : for naming convension i have given (A)(B)&(C).]

(A) - amounts should be the as on 19/4/03 date amount.balance as on 1day before to 'startdate'.

(B) - amounts should be the transaction amount, done in the period of 'startdate' and 'enddate'. i.e. from 20/4/03 to 20/5/03.

(C) - amounts should be the difference amounts of 'opening' and 'transaction'. i.e.

1. (C) debit = (A)Debit - (B)Credit or (B)Debit - (A)Credit

2. (C) Credit = (A)credit - (B)debit or (B)credit - (A)debit

for the above format...... the print command will be given ... by choosing startdate and enddate thru vb application.

Thanks in advance.....