What layout do you start on with this script?
Where is the button located on that layout? In a portal row?
On the :"printable purchase order" layout do you see one record for every PO or one record for every PO line item?
I start on the purchase order input layout.
The button is located in the header
I see all the purchase orders the layout no matter what view.
the layout Purchase order has in it a portal row from another layout (purchase order data) that is linked to the products tables for categories and product description etc please see enclosed
Ill put a view of the print up also.
I think Go to Related record is just replicating your found set on the "Print" layout.
If both layouts (input and print) are based on the same table occurrence (have same name selected in Layout Setup| Show Records from), then you don't need to do any Go to Related records. You can just change layouts. When using Save as PDF, be sure to specify the "Current Record" option so that you only get a PDF of the one PO.
But you might also examine the way the starter solutions print a PO or Invoice. They pull up the correct group of LineITem records on a list view layout and this can be a much more flexible way to do this. (And then GTRR makes sense to bring up a found set of line items.)