Announcement

Collapse
No announcement yet.

Printing multiple PDF reports

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Printing multiple PDF reports

    If I have a list of invoices on a grid and create a Run button, is it possible to tick all the invoices required for printing and print these directly to the default printer or create a single PDF of all invoices, display it and then print it?

  • #2
    Yes it is.
    Your sql statement for your pdf should be SELECT ... WHERE invoice_id IN ([glo_invoices])

    Create an array in the onScriptInit section of your grid to collect the ids.
    [to_print] = array();

    In the onRecord part of your button.
    [to_print][] = {invoice_id};

    In the onFinish section of the button.
    $invoices = implode(',',[to_print]);
    sc_redir(print_invoice.pdf,glo_invoices=$invoices, '_blank');

    That's just a rough sketch to get you the idea and you have to fine tune it for your needs.

    jsb

    Comment


    • #3
      Many thanks JSBINCA. Great feedback!

      Comment

      Working...
      X