"PrintAllRecord" --- Button for printing several records in one pdf
I'm looking for the formula to print several records of a child table in one pdf . "PrintAllRecord" doesn't work. Example :
for i in select ChildTableName do
Thanks for your help
So the following button script works - cos I already use it!
I've renamed parts to make it clearer for you
ChildTableName - needs to be the name of your child table
PrintName needs to be the name of your print layout
I use MyPrint (which is a yes/no flag so when set to 1 (it is yes) - you don't have to have this, but i have it to stop me issuing the same invoice twice!)
let a := (select ChildTableName where myPrint = 1);
for myVar in slice(a, 0, 20) do
myVar.(myPrint := 0)
Note the 20 in the slice arguments is a batch control ie - I print out 20 off at a time then issue them.
The beauty here is that if you use the control flag (myPrint) and set your table view to sort the view on this flag then the table will show you where you got to and then the next press of the button will resume from that point.
This will produce separate download pdf's for each record (ie invoices)
You could also use it in conjunction with sendEmail and a template letter to auto send via Email (works great for me with over 1500 documents to get out in a batch)
Thank you Mel, it does work! However, the solution is not ideal. Do you know if there is a way...
1) to first select a folder where all the PDFs are stored? Preview opens me a bunch of PDFs which I have to manually save somewhere.
2) to give each PDF a specific name (not just table+Id, but for example the name of the client).