I'd like to have a report based on a query that will calculate balance owed over 30 days old...This is what my query is so far: I know there should be a datediff expression somewhere, but don't know where and how to express it.
SELECT AerationInvoice.ClientID, AerationInvoice.DateBilled, Sum(Fees.FeeAmount) AS SumOfFeeAmount, Sum(AerationInvoice.AmountPaid) AS SumOfAmountPaid
FROM AerationInvoice INNER JOIN Fees ON AerationInvoice.FeeID = Fees.FeeID
GROUP BY AerationInvoice.ClientID, AerationInvoice.DateBilled
ORDER BY AerationInvoice.ClientID
WITH OWNERACCESS OPTION;
I also would like the report to be able to show the outstanding balance and list any additional charges, with a grand total due. Would this be accomplished with a sub report?
Thanks in advance!!!!
SELECT AerationInvoice.ClientID, AerationInvoice.DateBilled, Sum(Fees.FeeAmount) AS SumOfFeeAmount, Sum(AerationInvoice.AmountPaid) AS SumOfAmountPaid
FROM AerationInvoice INNER JOIN Fees ON AerationInvoice.FeeID = Fees.FeeID
GROUP BY AerationInvoice.ClientID, AerationInvoice.DateBilled
ORDER BY AerationInvoice.ClientID
WITH OWNERACCESS OPTION;
I also would like the report to be able to show the outstanding balance and list any additional charges, with a grand total due. Would this be accomplished with a sub report?
Thanks in advance!!!!