Crystal Reports Question!!
HI!!
I'm using CR 7 with VB 6 and I want to design a report with the structure as follows:
From Date '20/04/02' to Date '23/04/02'
-----------------------
Account : 1
Previous Acumm = 100 (Assuming 100 = sum of items with date < dateFrom)
item 1 100
item 2 100
item 3 100
Final = 400
1) I don't want to show items with date < date from, just the sum of them before detail items
2) I want to show detail items with date between date from and date to
3) I want to show the total
Thanks in advance.....
Here is how u have to Proceed
SQL Part
Write a sql to select the items u need.
Along with that query for the SUM(AMOUNT) for the <Date
eg
SELECT .., .., .., (SELECT SUM(AMOUNT) FROM TABLE WHERE DATE < FROMDATE) AS PREVIOUSAMOUNT FROM TABLE WHERE YOUR WHERE CONDITION
Crystal Report Part
Just call the query(Stored Proc created above) and display it. Use Grand Total for adding the quantity