April 3, 200817 yr 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.
April 3, 200817 yr 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 )
April 4, 200817 yr 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.
April 4, 200817 yr 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.
April 5, 200817 yr 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