How to Use Standard Placeholders in Print Destinations

We can use Docentric placeholders in any of print destination settings where it makes sense (Output filename, Azure blob container, Email address, Email body, etc.). There are two kinds of Docentric placeholders: Standard and Custom placeholders.

Standard placeholders are provided out-of-the-box for all reports. Please find the supported list below.
On the other hand, Custom placeholders are report specific and also provided by an additional model with so called Docentric SSRS Replicas, which can also be used with Free Edition. Learn more >>

No matter if you are using Free or Full Edition, you can use both Standard and Custom placeholders.

Standard placeholders

Standard placeholder list:

  • @FIELD_{Name of the field from the Report Execution Context table}@ -> extract the value of the specified field
  • @METHOD_{Name of the method from the Report Execution Context table}@ -> extract the value of the specified parameterless method, e.g. a display method
  • @PARAMETER_{Name of the report parameter}@ -> extract the value of the specified report parameter
  • @REPORTID@
  • @REPORTCAPTION@
  • @COMPANYID@
  • @COMPANYLOGO@
  • @COMPANYNAME@
  • @USERID@
  • @USERNAME@
  • @USERALIAS@
  • @USEREMAIL@
  • @WORKER@
  • @WORKERTITLE@
  • @WORKERDEPARTMENT@
  • @WORKEREMAIL@
  • @WORKERIMAGE@
  • @LANGUAGEID@
  • @TIMESTAMP@
  • @CURRENTDATE@
  • @CURRENTDATETIME@
  • @CURRENTDAY@
  • @CURRENTMONTH@
  • @CURRENTYEAR@
  • @GUID@
  • @BATCHJOBID@
  • @BATCHJOB_SCHEDULED_STARTDATETIME@
  • @BATCHJOB_ACTUAL_STARTDATETIME@

For example, we can put this kind of text in Email Body on the Docentric Email print destination:

@PARAMETER_DocumentTitle@ no. @FIELD_PurchId@ for the vendor @FIELD_VendName@ is attached to this email.
*** Prepared by @WORKER@ on @CURRENTDATE@.

The result will be:

Purchase order no. 2015/000255 for the vendor Contoso Europe is attached to this email.
*** Prepared by Kevin Cook on 05/25/2015.

Standard image placeholders

Note that @COMPANYLOGO@ and @WORKERIMAGE@ are image placeholders, and you can use them within an email body when emailing reports.

Learn more on how to use Standard image placeholders >>

Report execution context record and Standard placeholders

Standard placeholders @FIELD_{Name of the field from the Report Execution Context table}@ and @METHOD_{Name of the method from the Report Execution Context table}@ can be used only if the report execution context record is set.
Report execution context record can also be changed dynamically. Learn how >>

Report execution context record is set automatically usually when report is printed in the context of an underlying record (entity). For example, when Purchase order is printed from the Purchase order confirmation form for the currently selected VendPurchOrderJour record, then this record acts as the report execution context record.

You can also print a report from the code and set the report execution context record programmatically:

srsReportController.parmArgs().record(reportExecutionContextRecord);

Known issue: Report execution context is not set when posting invoices

If you are using standard placeholders such as @FIELD_InvoiceId@ when posting invoices, you will encounter the following issue: Report execution context is not set and the field value (InvoiceId) cannot be calculated.

Explanation: When posting an invoice, the Sales invoice report controller is not called providing the context record as args.record(), so the context record will be empty and consequently, you cannot use standard placeholders. On the other hand, when you print an already posted invoice from Invoice journal, the context record is set properly and everything works as expected.

This can be fixed by extending the report controller, or (much easier way) you can create a custom Docentric’s DSP class where you will set this context record to the current sales order.

However, we everything already solved for you with the additional Docentric AX SSRS Replicas model including support for improved Print archive and advanced emailing capabilities. Once you install this model, you will be able to use all pre-defined custom placeholders for the Sales invoice report including Invoice ID, Account number, Customer name, etc. that work without issues.

Thus, the solution for this issue is to install the Docentric AX SSRS Replicas model and use the custom @InvoiceId@ placeholder instead of the @FIELD_InvoiceId@ standard placeholder.

See also

How to Use Custom Placeholders in Print Destinations >>
How to Change Print Destination Settings Dynamically >>
How to Use the New Memory Print Destination >>

IN THIS ARTICLE