How to make a print button getting data from 3 different tables

  • 2
  • 1
  • Question
  • Updated 1 year ago
  • Answered
Newbie here, I Have 3 tables : Vendors, Purchase Orders, Purchase Items.
I want to have a print button in the 'Purchase Order' form that allows to print a PO with data from all 3 tables.

How can I do that ?

Thanks
Photo of Ayoub Salhi

Ayoub Salhi

  • 230 Points 100 badge 2x thumb
  • Hopefull

Posted 1 year ago

  • 2
  • 1
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
You can do that from the least child if they're related. Are the tables related?
Photo of Ayoub Salhi

Ayoub Salhi

  • 230 Points 100 badge 2x thumb
Hey Chris, Thanks for Replying.
Yes they are :
Vendor -> Purchase Orders
Purchase Order -> Purchase Items 

How to be able to print the PO from The purchase order form ?
(Edited)
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
You can pass lookup fields from Vendors to Purchase Orders. You can also pass lookup fields from Purchase Orders to Purchase Items. From Purchase Items, you'll have all the fields you will need for reporting purposes.
Photo of Ayoub Salhi

Ayoub Salhi

  • 230 Points 100 badge 2x thumb
But How can I have a print button in the PO form to do that ? Not in the Purchase items PIs (because a PO can have multiple PIs ).
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
The PO form should have an embedded report listing its children Order Items. If you use the provided print option under the "More" menu, you will see in the Print preview, the embedded list of Order Items child records.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,166 Points 50k badge 2x thumb
If you want to print a traditional PO, add lookup fields to the purchase order table and then the PO form from a the Vendor Table

Then put the report link field [Purchase Items] on the P.O. form and set the form properties to show the purchased items directly in the form.
Photo of Ayoub Salhi

Ayoub Salhi

  • 230 Points 100 badge 2x thumb
Thanks for answering,
I've done all that, I clicked on "More" then Print, but it doesn't let me customize the form before printing, neither it removes the buttons "Add Purchase Order" etc.. Is there an option to customize the form before printing it ?
Is there a way I can have a 'print Order' button that takes the user to a customized form. And he'll be able to print.
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb

you can create a form for printing.

Make a new form in PO having only the fields you want to print.

Make a new URL field in PO with the code below:


URLRoot()&"db/"& Dbid()&"?a=printr&dfid=##&rid="&[Record ID#]


dfid=## << put the form ID# of the print form you want to use for printing.

The form ID can be found in your list of forms for the PO table.

Photo of Ayoub Salhi

Ayoub Salhi

  • 230 Points 100 badge 2x thumb
Great  it works!! Thanks a lot Sir.