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.

Genrating a total of a total

Featured Replies

I feel like there's a much better way of doing this on order to generate what seems like a simple report, but cannot work out how... always struggled with report summaries and subsummaries!

SCHEMA

Table A = clients

Table B = invoices

B is joined to A by two foreignKeys for the purpose of this relationship

clients::ID = invoices::ID_client

clients::REPORT.ON.YEAR (global) = invoice::year

REPORT

I then have a report using table A CLIENTS.

(1) Requests a report year

(2) Finds all active clients

-- whether they have an invoice or not, thus why we need to do this from table A occurrence)

(3) Shows all one row for each active clients, and their invoice total for the report year specified.

-- invoices::%totalAmount is a summary field Total of invoice amounts)

(4) Shows total invoice amounts in a subsummary section (grouped by a category) and grand total in a footer.

CHALLENGE

My issue is with some subsummary and grand total in the footer.

In order to show the TOTAL VALUE of all invoices across all clients for specified year in the report, I could not just use %total, that would only show the top record in each category.

Instead I had to create these two fields in table A CLIENTS

{a} clients::invoiceAmountByYear_thisClient (calculation) = Sum ( invoices::amount)

Purely to feed the next field...

{b} clients::subtotal_InvoicesByYear (summary) = Total of invoiceAmountByYear_thisClient

Then I use {b} on the report for subsummary and total.

ISSUE:

To be clear, the approach above works, but of course subtotal_InvoicesByYear is a summary of a unstored calculation field, so you get a long period of summarizing every time you run it.

Additionally, just seems I am repeating myself, in that invoices::%totalAmount and clients::invoiceAmountByYear_thisClient are basically the same thing.

Seemed simple when I started, what am I missing Filemaker Gurus?

If you would generate your report from the Invoices table, then the one summary field would serve both purposes. Since you want to include clients that do not have any invoices to report on, you must do it the way you have described.

  • Author

Thanks. I hate it when I'm right, but it's this ugly. :(

Are you sure it's the grand total summary that slows things down?

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.