PDF and report saving questions


At the end of the day I would like to save all packing slips for the next day as PDF. I want to do this as some sort of backup option.

I tried 2 methods:

  1. Saving as PDF trough Dynamics AX
  2. Saving as PDF trough a seperate PDF printer

The problem I am facing is that AX automatically makes a pdf for each report. That way If I save it in either way, I have to manually change all the filenames or else I get a warning that there is already a file containing that name.

I can think of 2 solutions :

  1. Saving a PDF trough Dynamics ax and using a filename that automatically contains the salesorder ID or similar info for that packing slip.
  2. Tell AX in some sort of way to make 1 PDF of all the reports.

Can anybody tell me if its possible to use variables in filenames or think of another solution?

Kind regards,

A file name can be specified in PrintJobSettings class. For example:

printJobSettings.fileName(salesId + #pdf);

I am not very good in coding, could you tell me where I should insert these lines?

thanks in advance

It depends how you print the packing slips, anyway it would probably requires some minor redesign of your current solution, not just to place those three lines somewhere.

Ok, thanks for clearing that out.

Isn’t there a solution out of the box to put a variable in the document’s filename in the save as screen? That way I can manually save the report as filetype>PDF and I wont have to choose a filename for each report.