White Paper: Format & Alignment Transformations

Dynamics AX 2012


SUMMARY

A segment of our target customer base requires numeric characters to be rendered in reports using the national format to be compliant with government standards for the Department of Zakat and Income Tax documentation.  Developers also require field level control over the reporting framework’s numeric transformations which affect column alignment and formatting.  This document captures the reporting framework’s solution for using AX Metadata to control International adaptations for RTL languages (i.e. Arabic & Hebrew).   It also contains instructions for using Precision Design properties to control the framework’s textbox transformations.

 

REQUIREMENTS

  • Numeric format transformations occur for both Auto Designs and Precision Designs
  • Auto Design behavior is based on AX Meta Data
  • Precision Designs offer control over any text box in the report
  • Numeric format transformations are recognized by all supported clients (i.e. AX, EP, VS Preview, Report Mgr.)
  • Numeric format transformations occur when the AX language selected in the client configuration is set to a RTL language

 

NOTES

  • EDT properties are only available in cases where a direct field reference is defined in the text box expression
  • The Windows regional settings have no impact on the numeric formatting for SSRS reports
  • The SSRS platform does not support rendering DateTime values using national format characters

 

HOW THE FEATURE WORKS

The reporting framework provides automatic runtime design adaptations using Report Design Customization Extensions (RDCE) based on the language selected in report viewer’s AX client configuration settings. RDCE will automatically apply the numeric transformations for RTL languages when appropriate. There are two types of transformations applied by the framework for numeric characters:

  1. It will flip the alignment of textboxes in cases where the EDT alignment property is set to “Left” or “Right”
  2. The RDCE process will render the contents of a text box using the national format in cases where the EDT data type is an Integer, Real, or Int64

Note: EDT properties are only available using the AX Metadata service in cases where a direct field reference is defined in the text box expression.


FEATURE IN ACTION

The following example of an AX production report illustrates the transformation actions performed by the RDCE process. The layout of the design is flipped along the Y-axis. In addition, the framework leverages the AX Meta data service to determine when to adjust column alignments.

Sample production report – LTR language (EN-US) clip_image003

 

Same report after RDCE transformations – RTL language (Arabic) image

 

CASES

The table below outlines the default behavior applied by the reporting framework during the RDCE transformation for RTL languages.

image 

 

CONTROLLING TRANSFORMATIONS

This section describes the development process for controlling the RDCE transformations using text box properties in the Visual Studio Precision Designer.

 

PREVENTING RTL FLIP

Use the following steps to prevent the RDCE engine from flipping the text box alignment when the report is rendered in RTL languages.

STEP #1 – Identify text box

Identify and select the Text box in the Precision Design where you’d like to override the formatting transformations applied by RDCE.

STEP #2 – Edit properties

In the Properties Window, click the button rendered in the “CustomProperties” edit box.

clip_image008

STEP #3 – Add custom property

Add or Update the value associated with the “AXDataType” to use the value “Integer” or “Float

clip_image011

STEP #4 – Save your changes

Save your modifications to the Custom Properties and the report design

STEP #5 – Rebuild and deploy

Rebuild and Deploy the report

 

USING NATIONAL FORMAT

Use the following steps to control the variation of the number format to use. This step will instruct the SSRS framework to render numerals using the National format.

STEP #1 – Identify text box

Identify and select the Text box in the Precision Design where you’d like to override the formatting transformations applied by RDCE.

STEP #2 – Edit properties

In the Properties Window, set the value associated with the “NumeralVariant” property to “3”.

clip_image013

Recommendation: The NumeralVariant property must be managed using an expression to ensure that the value is set to “3” only in cases where the report is being rendered in Arabic.

Sample text box expression:  “ =IIF(Parameters!AX_RenderingCulture.Value = "ar", 3, 1)”

STEP #3 – Save your changes

Save your modifications to the Custom Properties and the report design

STEP #4 – Rebuild and deploy

Rebuild and Deploy the report

 

FAQ

 

Can I over-ride the AX Meta data settings that control RTL transformations in an Auto Design?

Yes, you can completely disable the RTL transformation in an Auto Design. However, Custom Properties used to over-ride numeric transformations are only accessible in the Precision Designer.

Do I have access to the text box Custom Properties in the header/footer of the report?

Yes, the text box Custom Properties are accessible in all areas of the report design

Are dates and times rendered in national format?

No, the SSRS framework does not support rendering dates using the national format

How else does the AXDataType custom property affect the output besides the RTL transformation over-ride?

It does NOT affect anything besides the text box RTL transformations

What are the possible values for the AXDataType custom property?

Integer, String, Float, Boolean, DateTime

Which values does the F/W look for to disable the RTL transformation?

Integer or Float

How do we surface errors as a result of Developer misuse (i.e. invalid property values)?

No errors are surfaced, since the framework only looks for these two values -> Float, Integer. Everything else is ignored.