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?

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

Many thanks JSBINCA. Great feedback!

is there a good way todo the same function but save each invoice as its own “individual” pdf?

Hi there,
I am having some difficulty on thus printing. Can you please provide a sample the programs?
Thanks