473,699 Members | 2,367 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Customer Statement Report:

7 New Member
Past Due Boxes: 30/60/90/etc

Hi! I am working on creating an Accounts Receivable database, and I want to be able to automatically generate statements for my customers. The statements need to list all open invoices (this works), total all invoices (this works), and have boxes at the bottom that show amounts currently due, 30 days past due, 60 days past due, etc. (the sticky wicket)

When I try to use the DSUM function I can only generate one statement at a time. If I try to run a batch of statements the boxes show the totals for the whole report, and not for each customer.

When I use subreports for the totals it seems to work. I view the report on screen and everything adds up perfectly. If a customer has no invoices that are 60 days past due it shows $0.00 in the box as it should. However, when I try to print the report (to the printer, to a PDF, or simply print preview) all the boxes with $0.00 dissappear. I know it is a null value error, but I don't understand why it shows up on the screen perfectly and won't print.

I'm telling you, Skynet won't need giant robots, the machines will simply annoy us to death. ;)

Any help would be greatly appreciated!!

~Vicki :)
Jun 10 '09 #1
5 4251
puppydogbuddy
1,923 Recognized Expert Top Contributor
Vicki,
<<<When I try to use the DSUM function I can only generate one statement at a time. If I try to run a batch of statements the boxes show the totals for the whole report, and not for each customer>>>>
All you needed to do was use the sorting/grouping tool in the report designer to create a footer on customer. Then you could use the summation formula on the amount field in the customer footer as shown.>> = Sum([theAmountField])
and there would have been no need for a subreport. Try it and let me know.
Jun 12 '09 #2
puppydogbuddy
1,923 Recognized Expert Top Contributor
PS: If you have nulls, you can do the formula this way:
>>>>>>> = nz(Sum([theAmountField],0))
Jun 12 '09 #3
msrobotto
7 New Member
@puppydogbuddy

Thanks puppydogbuddy, but that only gives me the total of ALL invoices for each customer, which I already knew how to do.
total all invoices (this works)
After that, at the bottom of the statement for each individual customer, I need sub-totals for:

all of the invoices that are currently due
all of the invoices that are 31-60 days past due
all of the invoices that are 61-90 days past due
all of the invoices that are 91-120 days past due
all of the invoices that are 121 days past due or more

The regular SUM function loses this detail, the DSUM can't be restricted to two parameters ('Customer' and 'DaysPastDue'), and since a large number of customers pay their bills before the bills are 120 days past due that field is often (but not always) null in a SUBREPORT- which makes the box dissappear entirely (and looks terribly sloppy).

I wound up deciding to cheat and hard coded a "0.00" value in a text box behind the subreport. If there is a value the subreport box prints and the zero can't be seen. If there is a null the box disappears and the zero behind it prints.

Primitive, but effective.
Jun 12 '09 #4
NeoPa
32,569 Recognized Expert Moderator MVP
Vicki,

Do you have a field that determines the date that needs to be checked to determine which box to assign the value to?

You probably need something like the following for the three boxes :
Expand|Select|Wrap|Line Numbers
  1. =Nz(Sum(IIf(Date() Between DateAdd('d',30,[InvDate]) And DateAdd('d',59,[InvDate]),[theAmountField],0)),0)
  2. =Nz(Sum(IIf(Date() Between DateAdd('d',60,[InvDate]) And DateAdd('d',89,[InvDate]),[theAmountField],0)),0)
  3. =Nz(Sum(IIf(Date()>=DateAdd('d',90,[InvDate]),[theAmountField],0)),0)
Welcome to Bytes!
Jun 12 '09 #5
NeoPa
32,569 Recognized Expert Moderator MVP
I posted my last before your last Vicki.

Nevertheless a few tweaks should give you what you need.

NB. DSum() can be restricted to two parameters ('Customer' and 'DaysPastDue'). It is far better practice to use Sum() where possible though. You will notice the performance difference in most cases.
Jun 12 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2441
by: The Blob | last post by:
Hi all, I need sone help on generating a SQL statement i had 3 tables now Customer >> Name >> Acct No >> Address
7
11439
by: mark | last post by:
Access 2000: I creating a report that has a record source built by the user who selects the WHERE values. An example is: SELECT * FROM CHARGELOG WHERE STDATE Between #10/27/2003# And #11/2/2003# And VehicleID='00000000' And BattID='LKO500HF'. I need to use the records returned to populate text boxes, but the data requires further manipulation. I attempting to use expressions in the control source
2
379
by: SusieS | last post by:
I'm trying to set up a simple relational Access database to look after customer orders for our small bookselling operation. I'm a beginner at this, teaching myself via Help files and the manual 'Access Inside Out'. I've set up linked tables Customers, Orders and OrderDetails and these seem to be working OK, accepting new data via forms and subforms. So now I need to print out a receipt detailing the order for the customer. I've assumed...
1
1258
by: teresaalmond | last post by:
I'm trying to create a report.. or qry.. or spreadsheet.. anything that will give me a count of types of machines purchases per customer. I've already created a table with all the info for the date range I'm looking at to make it easier to query (there are a LOT of records) I thought I could use DCount but then I realized it was counting totals. I need to count totals per customer. For example # of New excavators # of Used excavators
12
1700
by: Brad Baker | last post by:
I am trying to write a simple ASP.net/C# page which allows users to select some values and produce a report based on a SQL query. I have a self posting dropdown form which allows users to select the type of report to generate: Select the type of report to display: <form runat="server"> <asp:DropDownList AutoPostBack="true" ID="report" runat="server"> <asp:listitem>Report Type 1</asp:listitem>
1
4829
by: Herman Beeksma | last post by:
Hi there! I have two tables: Customer (ID, Name) Invoice (ID, Date, Customer, Amount) and want to select only the *last* invoice for each customer. It's easy to get each customer's last invoice date: SELECT Customer.Name, MAX(Invoice.Date) FROM Customer INNER JOIN Invoice ON Custimer.ID = Invoice.Customer
1
1659
by: Blue Lagoon Products - Customer Services | last post by:
Hi, We have an inhouse database that I designed in access 2000 with the help of all you guys some time ago. It stores orders and prints packing slips etc. I would like to put onto the packing slip wether this is a new customer or an existing customer. We do have a customer table, just one table for customer details, orders, notes etc, this is what works best for us as data is imported from payment files...anyway...
4
1687
by: myemail.an | last post by:
I have a database with information on customers and their transactions. The table with transactions has the following fields: Customer ID , Transaction ID, Transaction Type, Transaction Amount, Transaction Date Each customer may have up to 6 transactions. I'd need to create a table where each record is a customer and which has these fields: Customer ID , 1st Transaction - Transaction Type, 1st Transaction -
21
4638
by: DanicaDear | last post by:
I have a report named "rptHOTSTICKS_EXPIRING" based on a query named "HOSTICKS_SHIPPING_REPORT Query". The query contains these fields: ORDER_NUM (text) CUST_NUM (text) Name, address, contact info, I think not important to this thread DATE_SHIP (date) Then I have a field STICKS_EXPIRE: DateAdd("yyyy",2,) with criteria Between And where and are parameters.
0
8687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8914
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8883
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7750
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6534
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4376
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3057
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.