If you have 11 or more rows in the portal, what static text is needed for each of those rows?
If you can get all the data shown above the Work Codes section into a portal, there's a way to print this that does not require a portal for the data above this point.
What layout objects do you have below the Work Codes header? Layout text? A second portal? individual fields from the same record or ?
A quick and dirty solution that may work for you at least in the short term:
- Create a second layout that is a duplicate of this layout.
- Edit portal setup... so that it displays 10 rows with row 11 as the initial row.
- Edit the layout as needed to make it work for rows 11-20.
- In your script, after printing page one, You can use the count function to count the number of records in the portal's table. If it exceeds 10, the script can change layout and print the second page from this new layout.
Everything on the page is static text except for the portal in the upper left corner (2nd picture) and that goes for the text below the Work Codes header. They need this ASAP which is why I didn't put anything else in the portal. I may look at this option down the road when I have more time for sure. In fact, the plan is to get the whole thing into the system so it can be filled out on-site using an iPad. Next phase of the project.
For now I like your quick and dirty solution Phil. I will explore it further. It doesn't look like it will take that long to do. Thanks for your help!
When you get the time, take a careful look at how the invoices starter solution prints out an invoice. That invoice contains a portal of related line items records and the layout used to print the invoice automatically adjusts for item lists that exceed the number of rows shown in the original portal by using a list view layout based on the portal table. That's the suggestion I was alluding to at the start of my last post.
It would require loading the "static text" to the right of this portal into fields in your portal table so that the portal spans the entire top of the layout. Once you can do that, the list based layout like the starter solutions uses becomes a possible solution.
That sounds like exactly what I'll do when I get the time. That will handle things until they go to an all iPad solution on-site. Thanks Phil.