Please Read the following Code and can some tell me .
CRFlag Mean i guess this is field.
CRFlag=True Mean i don't know .
CDFlag i think this a Field in the Query.is this a field in table.
Can somone tell me about this two little Question.
Code and Explanation
So to do what you are trying to do, you would use DSum to calculate the Beginning Balance by summing iif([CRFlag]=True, TransactionAmount, -TransactionAmount) where date < Your ReportBeginDate
For the debit and credit fields, you use a query containing TransactionTypeID, TransactionAmount and CDFlag. In two textboxes on your report.....For the Credit, you use the expression =iif([CRFlag]=True,[TransactionAmount],Null) and for the Credit, you use the expression =iif([CRFlag]=False, [TransactionAmount],Null)
For the Running balance, I'd calculate =[BeginningBalance=+iif([CRFlag]=True,[TransactionAmount],-TransactionAmount]