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.

Summaries from parent relationships in layouts

Featured Replies

I'm having trouble getting the Grand Summary section to give the correct amount on this layout. I keep getting zeros for Summaries based on a parent related fields.

The layout below is showing records from the TicketItems table, Item lines are the body.

The subsummary section is based on sorting by TicketID. TotalCost is a Summary of Cost, but Haulchrg, Surchrg, and Total exist only on the Ticket because they only apply to the Ticket.

Ticket1

Item 1 Cost

Item 2 Cost

subsummary TotalCost Haulchrg Surchrg Total

Ticket2

Item 1 Cost

Item 2 Cost

subsummary TotalCost Haulchrg Surchrg Total

Grand Totals

TotalTotalCost = number (works fine)

Total Haulchrg = 0

Total Surchrg = 0

GrandTotal = 0

Total = Haulchrg + Surchrg + TotalCost

TotalCost = Summary (Total of Cost)

Haulchrg = Tickets::Haulchrg

Surchrg = Tickets::Surchrg

TotalTotalCost = Summary (Total of TotalCost)

Total Haulchrg = Summary (Total of Haulchrg)

Total Surchrg = Summary (Total of Surchrg)

GrandTotal = Summary (Total of Total)

Hope that shows enough detail to understand what I'm trying to do. How can Total Haulchrg, Total Surchrg and GrandTotal summaries work properly if they are based on records in a parent relationship? Or is that even possible?

BTW, I tried to add space to the lines above to show indented item lines but HTML ignores them.

Thanks.

Try something lke this:

sCountItems = Summary ( Count of TicketItemID )

cHaulchrgShare = Tickets::Haulchrg / GetSummary ( sCountItems ; TicketID )

cSurchrgShare = Tickets::Surchrg / GetSummary ( sCountItems ; TicketID )

sHaulchrg = Summary ( Total of cHaulchrgShare )

sSurchrg = Summary ( Total of cSurchrgShare )

  • Author

I thought about this approach earlier, but I was hoping to avoid it because of the added calcs.

Is it possible to approach it from the parent (Ticket) direction? Basing the layout on the Tickets table and then getting the ticket item details to appear on the report. I'm not sure how to get the ticket item details in the body of the layout when the layout is getting its records from the Ticket.

If I did this then the existing Summaries will work.

I am not sure what the issue with the added calcs is. This method eliminates at least two calcs you have listed above (Haulchrg = Tickets::Haulchrg and Surchrg = Tickets::Surchrg), so it should at least even out.

Producing the report from the parent table is possible, but rather clunky. You would need to place a portal on the parent layout, with enough rows to accommodate the maximum expected number of children, and set it to shrink during printing.

  • Author

No, your right. After looking at it again, creating this kind of summaries will work fine.

Thanks for the pointers.

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.