How to script layout portal print doesn't print blank lines ? Only print the data that is input in there.
It's best practice to print from the "child" table (the table with the records in your portal) and not use a portal at all for printing.
If you insist on a portal, you can set it to "Slide up" when printing, and also reduce the enclosing part.
To print from the child table, set up a list view layout with any needed parent fields placed in the header, footer and/or grand summary parts. Use a script with the go to related records step to bring up the correct found set of child records.
Such s layout can both shrink and expand to print all rows of data from your portal.
Retrieving data ...