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

Summarize just the shown contents of a portal.


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

Recommended Posts

Posted

I have a print form set up to print multiple pages. It uses several tabs, showing the related records in a portal with a finite number of rows on each (1-25, then 25-50, etc.), and the print script switches tabs as needed for the count of related items.

I now need to place a quantity total below on each tab, summarizing just the quantity field from related records of the portal range shown on that one tab.

So I need to a field to calc sum(quantity) from related records 1-25, and another for 25-50.

Trying to find something more graceful than a written out Get Nth, given I am recursive-challenged.

No sort on the portal, this is just based on count 'range' of related records as entered order.

This is real just about summarizing the records by range, and the portal itself is irrelevant.

Of note, it's a preprinted triplicate form on a roll fed strike printer, and requires precise graphic alignment, so would prefer to maintain the tabbed pagination rather than redo and face alignment issues to utilize summary breaks just for this one new addition.

Posted

Of course, this would be a lot easier if you simply printed from a list layout of the child table.

RUNNING total! Beautiful, many thanks!

Yes, a child report would be a no brainer (except for pesky alignment issues), but this will make the user very happy.

Posted

Refined so it doesn't mind a partial filled portal, and my hard coding for the portals.

Let( [

CountTotal = Count(parent::children);

StartN = 1;

EndN= 25;

RunTot = children::Quantity_srun];

GetNthRecord ( RunTot ;

If (CountTotal < EndN; CountTotal; EndN) ) -

Case ( StartN > 2 ; GetNthRecord ( RunTot; StartN - 1 ) )

)

Thanks again!

This topic is 4565 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.