Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Summaries from parent relationships in layouts


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

Recommended Posts

Posted

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.

Posted

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 )

Posted

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.

Posted

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.

Posted

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

Thanks for the pointers.

This topic is 6077 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
×
×
  • Create New...

Important Information

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