Button to save a pdf when multiple print layouts are available
Hello,
i have a form and multiple print layouts (that's because from the same data in the form, I need to have many different papers created).
1. Is there a way to add different buttons the form (one for each print layout), so that I can save the pdf (or print) without having to click on the printer icon, select the correct print layout and then export the pdf
That would be a huge time saver.
2. if point 1 is possibile, would it also be possible to set the path for the saved pdf?
Thank you all.
6 replies
-
I would suggest to use a choice field, for example 'PrintLayout' with exactly the names of your printlayouts.
Then use something like this in your PRINT button:
let lay := text(PrintLayout);
importFile(this, printAndSaveRecord(this, lay), lay + Invoicenumber + ".pdf");
So it's maybe wise to call your printlayouts on how you want to call your PDF's also.
Saving to a certain path is not easy to do, but maybe doable with some code and API, maybe even javascript...
Maybe a API specialist can jump by this post?
-
I use some dedicated buttons for a common print layout ie a Delivery Note. The Other Notes button give a choice as per Steven's suggestion ie as per example
let result := dialog("Print Other Delivery Notes", "Print Part Order Delivery Note (YES) or Print Plain Note (NO)", ["Yes", "No"]);
if result = "Yes" then
printRecord(this, "Part Order Note")
else
if result = "No" then
printRecord(this, "Plain Note")
end
endand my Parcel Label button does exactly what it says on the button - I could combine it all into one button but for my delivery notes I like the separate options.
No idea about point 2...
-
RoSoft_Steven and Mel Charles
Thank you both. I think I'll try both suggestions and then decide which one fits better :):)
Content aside
- 2 yrs agoLast active
- 6Replies
- 170Views
-
4
Following