FAQ TFORMer Server
How can I dynamically control the file name for a PDF printer type?
How can I dynamically control the file name for a PDF printer type?
Here we show you two different options:
a) Set the document name via an expression in the form: Use the system variable Device to get the directory and then append the file name via a variable expression.
- Under Properties ➔ Device, set the prefix for the path.
- Then, via an expression in the form/report property Document Name (in the layout), append a dynamic file name.
- For example, you can append a timestamp, so that the document name yields the full path: Device + Format(Now(), "yymmdd-HHmmss") + ".pdf"
- To prevent overwriting, you can add an additional identifier (as a prefix, suffix — in principle any data field is possible).
b) Set the document name from outside via an external data field tfDokumentName:
- tfDokumentName is a system data field that does not need to be created separately.
- This external data field is automatically appended to Device.