Solved

Aging Report

Posted on 1998-08-29
5
510 Views
Last Modified: 2006-11-17
How do I create an aging report in V8?
0
Comment
Question by:rtstannard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 1

Expert Comment

by:rene_moeller
ID: 1960652
Could you be a bit more specific?
0
 
LVL 4

Accepted Solution

by:
tomook earned 100 total points
ID: 1960653
The general technique is to add a calculated field to a query which determines the "bucket" for each record, then run GROUP BY on that field. To make this simple, you can use two queries, one to calculate the bucket and a second to group.

For example, given the tables and fields:
Customers
   CustID
   CustName
Invoices
   InvID
   CustID
   AmountDue
   Age

Make Query1:
SELECT InvID, CustID, AmountDue, Age,
IIF(Age <= 30, "Current", IIF((Age > 30) And (Age <= 60) , "30-60", "Over 60") As AgingBucket
FROM Invoices;

And Query2:
SELECT CustID, Sum(AmountDue) As BucketTotal, AgingBucket
FROM Query1
GROUP BY CustID, AgingBucket;

0
 
LVL 4

Expert Comment

by:tomook
ID: 1960654
I should note that you can structure things a little differently, which helps you print standard invoices or statements.

Query1:
SELECT InvID, CustID, AmountDue,
  IIf(Age<=30, AmountDue, 0.0) As BucketCurrent,
  IIf((Age>30) And (Age<=60), AmountDue, 0.0) As Bucket30,
  IIf((Age>60) And (Age<=90), AmountDue, 0.0) As Bucket60,
  IIf(Age>90, AmountDue, 0.0) As BucketOver90
FROM Invoices;

Query2:
SELECT CustID,
  Sum(BucketCurrent) As BucketCurrentTotal,
  Sum(Bucket30) As Bucket30Total,
  Sum(Bucket60) As Bucket60Total,
  Sum(BucketOver90) As BucketOver90Total
FROM Query1
GROUP BY CustID;

Query2 will show you one record per customer, which makes certain reports easier to write.
0
 

Author Comment

by:rtstannard
ID: 1960655
tomook:  Thanks for a full, understandable, and syntactically correct answer.  Good work!


0
 
LVL 4

Expert Comment

by:tomook
ID: 1960656
I am glad there were no syntax errors as I just typed it in cold. Thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question