How to Add Missing Labels to Multilingual Reports
We often need to print reports in D365FO in different languages.
To support multilingual reports we need to use D365FO labels in Docentric templates. We can use labels of the data records and fields from the report data source without any additional setup. These are so-called System labels. However, we will often need to use some labels different from those offered as System labels.
When you need a label that you cannot find in the report data source, you can use so-called Dynamic labels. These are labels whose codes you can enter manually in Docentric designer as shown on the image below.
When you run a report with Dynamic labels from within D365FO, the label codes will be properly replaced.
However, when previewing a report with Dynamic labels you will get #LABEL_MISSING# text instead of the label translations. This is because Docentric designer is a standalone app with no connection to D365FO so previewing documents from within the designer is performed completely offline, using only sample data and label translations for the currently selected preview language from the loaded DDSP.
Using Custom labels is a better way to add missing labels to your reports. In fact, they act in the same way as Dynamic labels; the only difference is that they are not added in Docentric designer but in Docentric report setup in D365FO.
Follow next steps to set up custom labels:
- Navigate to the Docentric AX workspace and open the Reports tile.
- Select your report.
- Add missing labels as Custom labels.
After you add these Custom labels in Docentric report setup, in order to enable them on the template you need to regenerate the DDSP. After you load the newly generated DDSP into the template, the Custom section (see the image below) will appear in Docentric designer containing all custom labels specified in Docentric report setup for this report.
Please note that adding Custom labels in Docentric report setup is only for your convenience. You will have templates with readable label translations instead of label codes. In addition, you will be able to preview them directly from within Docentric designer in different languages without #LABEL_MISSING# text.
Use User-defined labels as Custom Labels
User-defined labels are introduced with the 3.3.7 Docentric version to remove limitation of using only D365FO labels as Custom labels. Namely, up to 3.3.7 version you could add any existing D365FO label to act as a Custom label for a report in Docentric report setup. The problem was that often you could not find appropriate D365FO labels for your needs. Unlike AX 2012 labels, new D365FO labels cannot be created at runtime but only in development phase.
On the other hand, User-defined labels can be created, translated and maintained from within D365FO. Once you have your labels created User-defined label setup, you can add them to a wanted report directly from there, by clicking the Add to report button.
Alternatively, you can locate the wanted report in Docentric report setup and add multiple User-defined labels to by clicking the Add user-defined button in the toolbar of the Custom labels list.