I have created a sub-form. This sub-form contains the following columns (amount (decimal) , description (text) , transaction type (option - Receipt, Cheque).
Based on the transaction type, amount will either be positive (cheque) or negative (receipt).
Now I am trying to create a report that will summarize all the information (cacluate the total amount for transaction type cheque or receipt) for a particular job no.
IF "Consumer Disbursement"."Transaction Type" = "Consumer Disbursement"."Transaction Type"::Receipt THEN
BEGIN
TotalAmountReceipt := "Consumer Disbursement".Amount + TotalAmountReceipt;
END
ELSE
IF "Consumer Disbursement"."Transaction Type" = "Consumer Disbursement"."Transaction Type"::Cheque THEN
BEGIN
TotalAmountCheque := "Consumer Disbursement".Amount + TotalAmountCheque;
END;
Remaining := TotalAmountCheque + TotalAmountReceipt;
For some reason, it wont detect the transaction type: cheque. It calculates the total for receipt but it wont find any cheque type transaction.
Any idea why it might be doing this??
Answers
After spending hours trying to figure out why its not working. I just found the problem and its fixed.