Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how to create a Credit And Debit amount report with start a opeing balance on top of report and center shows all given date range credit and debite details and in the footer last closing balance

Table
Date_Tran	credit	debit
2/2/2019	5000	
3/3/2019		5000
5/3/2019	25000	
10/3/2019	30000	
11/3/2019	40000	


selected date range two different

select date	
from	to
3/3/2019	11/3/2019


then crystal report result
	result		
	opeing balance	5000	CR
			
date	creadit	debit	
3/3/2019		5000	
5/3/2019	25000		
10/3/2019	30000		
11/3/2019	40000		
			
			
closing balance	95000	CR	


What I have tried:

	result		
	opeing balance	5000	CR
			
date	creadit	debit	
3/3/2019		5000	
5/3/2019	25000		
10/3/2019	30000		
11/3/2019	40000		
			
			
closing balance	95000	CR	
Posted
Updated 26-Sep-19 6:16am

1 solution

"Control break" on "period". The "sum" of the previous period(s) is the closing balance of that period, which is the opening balance of the following period, etc.
 
Share this answer
 
Comments
irfanansari 27-Sep-19 7:51am    
but how tell process
select VouDt, InvId,
(select sum(Qty) from inv where VouDt< i.VouDt) as OpnQty,
sum(Qty) as Qty,
(select sum(Qty) from inv where VouDt< i.VouDt)- sum(Qty) as ClsQty
from Inv as i
where voudt >= '2012-04-01' and vouDt<='2012-04-30' -- filter date here it's for april-2012
group by InvId,VouDt i already use but how in report

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