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

Printing a portal across multiple pages


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

Recommended Posts

Posted

It's recommended to print portal items from their own file (the portal-ed file, not the portal-ing file).

Posted

"portal-ed" and "portal-ing"

LOL

Are these terms in "Learn FileMaker Pro 6..."?

Posted

Yes...along with the terms table porter-er (the table doing the portal-ing), table porter-ee (the table being portal-ed), and portal-ist (the FM programmer setting up the portal). Isn't English a great language?

Posted

To get back to the question at hand, this is quite difficult to do. It is better to make your print layout in the database being viewed through the portal, thus using a regular list layout to print and not use a portal at all..

But if you absolutely have to do this ... I had a situation where I was forced to. I was printing packing slips where most of time the ordered line items were twenty or less. My layout would accomodate up to twenty. Then came a 25-line order one day (very rare in what I'm doing).

What I did was duplicate the print layout and redefine the portal on the dupe for a different relationship. My script runs a subscript in the line item database that isolates the 25 on this order, sorts them, goes to the first record, then omits-multiple 20. I now have a found set of items 21-25 to be printed on page 2. I made a text field and the script will replace-with-calc the text: "Page2" & PrimaryKeyField.

Back in the header database where the print layouts live, I made a calc field that is always "Page2" & PrimaryKeyField. The redefined portal on the dupe print layout is now based on a relationship between the "Page2" fields. It will only display lines 21-25 in my example, and be empty if the order is less than 21 lines.

To make it fancy, I made another dupe of the original print layout, and removed the totalling footer altogether. This "Page1" layout will list the first 20, but the totals will only appear on page two.

Finally, the master script that prints these things is looping through all orders to be printed. It is testing the line item record count. If it finds one over 20, it goes to the new "Page1" layout and pauses. I print (manually). When unpaused, it switches to the Page2 layout and pauses. I print again. When unpaused, it returns to normal layout and normal activity for the rest of the orders.

Perhaps I could automate the printing itself into the script, but these two-pagers come along one in every several thousand orders, so it's not worth the trouble.

Steve Brown

  • Newbies
Posted

Thanks guys, I see it is quite hard to do.

If I only could define a section to slide that would be great ... So the layout section where the portal is slides, footer section doesn't. I can see that this is very hard to accomplish for FM. And yes, it is used for packing slips.

Well, to save time I will just pre-print the footer on the paper.

I could also duplicate the one page layout and make it two pages. This way if I see i don't have enough rows, I just toggle to the longer layout. I could even script that like you proposed Steve, thanks!

Posted

You might play around with a trailing grand summary part instead of a footer. It will efectively slide up to the bottom of a list, though I don't know how it would react to a portal. I would imagine it would treat the portal as a single static object with a height equal to the defined max number of rows, regardless of the number of rows being displayed.

If you decide to go the route I outlined, let me know and I'll give you pointers regarding the initial scripts that rope together the over-sized order.

It sounds more complicated than it is. It took me about two hours to set it up.

Steve Brown

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