am attaching a screenshot of query i have made
i want to make an ageing report so that if i can mention a date range from to
it shows days greater than 30/60/90 days with opening balance.
now in this query the result comes in column form due to which i cannot get total of the same bill number ( it is showing bifurcated) i want it to show as the image this is for one party i want for all or one as required please advice how can i make the report
the sql of query is
SELECT Account_Transaction.Ledger_Code, Account_Transaction.Amount, Account_Transaction.Vou_Date, Account_Transaction.DrCr, Customer_Master.First_Name, Customer_Master.Ac_No, Ledger_Master.op_bal, Account_Transaction.amountcr, Account_Transaction.inst_no, Sum(Account_Transaction.amountcr) AS [bill amount]
FROM Customer_Master INNER JOIN (Account_Transaction INNER JOIN Ledger_Master ON Account_Transaction.Ledger_Code = Ledger_Master.lg_code) ON Customer_Master.Customer_Code = Ledger_Master.alias_code
GROUP BY Account_Transaction.Ledger_Code, Account_Transaction.Amount, Account_Transaction.Vou_Date, Account_Transaction.DrCr, Customer_Master.First_Name, Customer_Master.Ac_No, Ledger_Master.op_bal, Account_Transaction.amountcr, Account_Transaction.inst_no
HAVING (((Account_Transaction.Ledger_Code)>90))
ORDER BY Customer_Master.Ac_No;