Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Retrieving proper records for a report

Featured Replies

Hello Forum!  I apologize if this post is in the wrong place, but the 'Reports' section did not appear to have a place for just reports.

I am trying to create a report using information from multiple tables.  The relationships are:

 

Customers >-------Equipment >---------Service.

 

I would like the report to show all the customers that meet a certain criteria (the easy part).  When I bring over their related records from Service, I only want to see their most recent 'Annual Tune Up' record, and if there are not any, then their most recent service record, and if they have no service records at all, then it can be blank.

 

Annual Tune Up, is a value in the Service Table, from field 'Reason for Call'.  This field is tied to a value list populated by the static values:

     Annual Tune Up

     Repair

     Service Call

     Installation

     Initial Inspection

     Warranty

 

I tried many things, but what I got the closest with was another TO of Customers linking Customer PK to Service FK and sorting the relationship by Date (descending).  This gave me all the customers, but only the most recent 'Reason For Call' regardless of what type of call it was.

 

If I filter by "Annual Tune Up" I don't get the customers who have never had an annual tune up.

Sorry for the long post.  I enclosed some screenshots of a Service Record, and the report layout.

 

Any help or guidance would be greatly appreciated :)

Thanks

Steve.

post-111098-0-41910400-1410365447_thumb.

post-111098-0-82359700-1410365463_thumb.

If you have

 

Customers -< Equipment --< Services

 

and sort the relationship between Equipment and Services by serviceType ascending*, date descending, then the first related record (if any) from Services is either the most recent Annual Tune Up, or the most recent service of any other type.

 

* Based on your value list, rather than alphabetically, if that makes a difference.

 

I only want to see their most recent 'Annual Tune Up' record, and if there are not any, then their most recent service record, and if they have no service records at all, then it can be blank.

  • Author

Sorry bout that Lee...thanks.

Thanks for your reply Oliver.  Unbelievable (Only to me :))  I would've never thought it was that simple.  Thanks for your help :grad:.

Of course I don't know quite why it works, and I it doesn't appear to change anything else in the database.

Thanks again.......

Steve

Hey, how long you gonna keep calling your skill level 'Intermediate'?

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.