Forum Discussion

AyoubSalhi's avatar
AyoubSalhi
Qrew Trainee
7 years ago

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

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

9 Replies

  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain
    You can do that from the least child if they're related. Are the tables related?
  • 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 ?
  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain
    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.
    • AyoubSalhi's avatar
      AyoubSalhi
      Qrew Trainee
      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 ).
    • ChrisChris's avatar
      ChrisChris
      Qrew Assistant Captain
      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.
  • 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.
    • AyoubSalhi's avatar
      AyoubSalhi
      Qrew Trainee
      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.
    • ChrisChris's avatar
      ChrisChris
      Qrew Assistant Captain

      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.