Jump to content

Counting orders by customers


TurboJokke
 Share

This topic is 4355 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello fellow fmforumers!

I manage a database with two tables, one is the customer table, and the other is orders. They are linked together by customer name.

Now, I have setup a search where I can select two dates, and list all orders placed in that date range. That however, gives me a long list of all orders, with the customers name on them.

What I would like is just a list of all customers who placed an order in that time period with an order count next to it. I cannot wrap my head around how to do this, so any help would be appreciated!

  • Like 1
Link to comment
Share on other sites

I manage a database with two tables, one is the customer table, and the other is orders. They are linked together by customer name.

That is not the way to do it. They should be linked by CustomerID, which is an auto-entered, meaningless, serial number.

Now, I have setup a search where I can select two dates, and list all orders placed in that date range.

Wouldn't you simply enter a date range in an Order Date field?

That however, gives me a long list of all orders, with the customers name on them.

Just gtrr match found set, Orders>Customers.

Link to comment
Share on other sites

  • Newbies

That is not the way to do it. They should be linked by CustomerID, which is an auto-entered, meaningless, serial number.

Wouldn't you simply enter a date range in an Order Date field?

Just gtrr match found set, Orders>Customers.

I use two drop down calendars to choose the date range, seems to work fine.

How does this work exactly? I added go to related record, match found set, but the list remains the same.

Link to comment
Share on other sites

What I would like is just a list of all customers who placed an order in that time period with an order count next to it.

You could sort the found orders by customer (ID) and show them in a layout with a 'sub-summary by customer' part and no body part. Use a summary field to do the counting.

Link to comment
Share on other sites

This topic is 4355 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.