Handling language-specific formatting of placeholders

Prev Next

The parameter AX_RenderingCulture is used to handle different language-specific formatting preferences. For example the English for numbering a dot is used and in German a comma.

Possible values are en-us, de-at, ….

The rendering culture can be used to format data fields according to the report language. To do so, it is necessary to include the ReportParameter table in the data map. The best way is to clone one of the data sources, because there is no need to fill out the connection setup again.

Steps

  1. In Microsoft Word or Excel, go to the dox42 ribbon and select Data Map.

    Toolbar displaying various functions like Generate, Data Map, and Refresh Template options.

    dox42 ribbon

    The Data Map Designer window opens.

  2. Selected the desired data source.

  3. Select the Clone button.
    A copy of the data source is created.

  4. Select the copy and select the Edit button.

  5. In the Name text field enter ReportParameters.

  6. Select the ReportParameter in the Table dropdown.

  7. Select the AX_RenderingCultureParameter checkbox.

    D365 FSCM Report parameters with highlighted AX_RenderingCulture field and data sources.

    AX_RenderingCultureParameter checkbox in data source

  8. Select a placeholder where you want to apply language-specific formatting.

  9. In the dox42 Data Fields pane into the Culture text field enter the following text: EN => <%ReportParameters.AX_RenderingCulture%>

  10. Select the OK button.

Result

The placeholder will be formatted language-specific.

Best practice: Using a dynamic field for language-specific placeholders

It can be useful to create a separate dynamic field for “Culture” in the ReportParameters data source and further use this dynamic field in all other places of a template. Therefore, if you need to make any changes in the format of data fields, you will need to modify only one field.

  1. In Word or Excel, go to the dox42 ribbon and select Data Map.

    Toolbar displaying various functions like Generate, Data Map, and Refresh Template options.

    dox42 ribbon

    The Data Map Designer window opens.

  2. Select the Dynamic Field button.
    See Creating a dynamic field.

  3. Enter the name of the field.

  4. Into the Visual Basic Code text field enter: result = "EN => " + ReportParameters.AX_RenderingCulture.

    Dynamic field configuration for rendering culture in Visual Basic code example.

    Dynamic Field with ReportParameters.AX_RenderingCulture

  5. Select the OK button.

  6. In the document template select a placeholder with the Type Number.

  7. Into the Culture text field insert EN => <%ReportParameters.AX_RenderingCulture%>.

    Configuration settings for LineAmount and culture parameters in a report design interface.

    Filled out Culture text field

  8. Select the OK button.