A
Angi
I've read about 40 of the 61 postings about aging reports, and couldn't
find my problem. Please forgive me if this has been covered.
I have a statement that lists all open invoices and payments for a
customer with a balance. Works fine. I've created a subreport in
report footer for aging totals with the query StmtSubreport as it's
record source. My problem is a couple of things:
1 - My totals are giving me the acct total due instead of the aging
group total.
2 - It's listing the columns and totals for each invoice, rather than
the totals I thought I was asking for. There should only be one
line...not a line for each invoice.
Can someone please tell me what I'm doing wrong? TIA
Subreport record source:
SELECT DSum("amtremaining","invoicemain","coid=" & [coid]) AS TotDue,
IIf(DateDiff("d",[orderdate],Date())<=30,DSum("amtremaining","invoicemain","coid="
& [coid])) AS CurrentDue, IIf(DateDiff("d",[orderdate],Date()) Between
31 And 60,DSum("amtremaining","invoicemain","coid=" & [coid])) AS
ThirtyDays, IIf(DateDiff("d",[orderdate],Date()) Between 61 And
90,DSum("amtremaining","invoicemain","coid=" & [coid])) AS SixtyDays,
IIf(DateDiff("d",[orderdate],Date())>90,DSum("amtremaining","invoicemain","coid="
& [coid])) AS NinetyDays, invoicemain.CoID
FROM invoicemain;
find my problem. Please forgive me if this has been covered.
I have a statement that lists all open invoices and payments for a
customer with a balance. Works fine. I've created a subreport in
report footer for aging totals with the query StmtSubreport as it's
record source. My problem is a couple of things:
1 - My totals are giving me the acct total due instead of the aging
group total.
2 - It's listing the columns and totals for each invoice, rather than
the totals I thought I was asking for. There should only be one
line...not a line for each invoice.
Can someone please tell me what I'm doing wrong? TIA
Subreport record source:
SELECT DSum("amtremaining","invoicemain","coid=" & [coid]) AS TotDue,
IIf(DateDiff("d",[orderdate],Date())<=30,DSum("amtremaining","invoicemain","coid="
& [coid])) AS CurrentDue, IIf(DateDiff("d",[orderdate],Date()) Between
31 And 60,DSum("amtremaining","invoicemain","coid=" & [coid])) AS
ThirtyDays, IIf(DateDiff("d",[orderdate],Date()) Between 61 And
90,DSum("amtremaining","invoicemain","coid=" & [coid])) AS SixtyDays,
IIf(DateDiff("d",[orderdate],Date())>90,DSum("amtremaining","invoicemain","coid="
& [coid])) AS NinetyDays, invoicemain.CoID
FROM invoicemain;