Certain controls, when used together, create a matrix-like layout. Although the individual controls are supported, the matrix-like layout will not transform successfully. Before you transform forms with a matrix-like layout of controls, you must redesign these forms in the Classic client Form Designer to ensure that fields on the transformed page are displayed in the same matrix-like layout as on the original form.

The RoleTailored client has the following requirements for forms that you want to transform:

Statistics forms are an example of forms with a matrix-like layout that display fields in more than one column. The following illustration shows a statistics form in the standard application, Form 151, Customer Statistics.

Form 151, Customer Statistics, does not comply with the second or third requirements for forms that you want to transform. The second column has a row header that is a calculated text box. In addition, in the first row with column headers, Form 151 has both a calculated text box control (with SourceExpr=CustDateName) and label controls.

This form has been redesigned in Microsoft Dynamics NAV 2009 so that the second column header is a label with CaptionML="This Period" instead of the original calculated text box. The first row with column headers contains only labels, to which you can apply the FixedLayout option. The form has also been redesigned to include a second row for the calculated text box, SourceExpr=CustDateName. In the other columns in this new row, the form is redesigned to include placeholder controls so that the form complies with the first requirement.

The following illustration shows the transformed page if you first redesign the form, as described in this topic, and then transform the form.

Another example of a form in the standard application with a matrix-like layout that you must redesign and apply the fixed layout property is form 6510, Item Tracking Lines.

An example of a form in the standard application to which you must apply the fixed layout property is form 39, General Journal.

Redesigning a Form with a Matrix-Like Layout of Controls

To redesign a form with a matrix-like layout of controls

  1. Determine which of the four requirements with which the form does not comply.

  2. Click the Tools menu, and then click Object Designer. In Object Designer, select Form, select the form that you want to transform, and then click Design.

  3. If the form does not comply with the requirement that all cells in the matrix-like layout must contain a value, then you must create a placeholder value in any cell that you want to leave blank. To create a placeholder value, we recommend that you set the properties of the cell to the following values:

    • Control := TextBox

    • SourceExpr := Text000 (where Text000 is defined as a global text constant with the value "Placeholder."

    • ForeColor = 65535 (Yellow, to mark the placeholder)

    • Visible = No

    To create the placeholder with these values, do the following:

    1. Create a text box. For more information about how to create a text box, see How to: Add a Text Box.

    2. Right-click the new text box and then select Properties.

    3. In the TextBox - Properties window, find the Visible property. In the Value column, select No from the drop-down list.

    4. In the TextBox - Properties window, find the ForeColor property. In the Value column, enter 65535.

    5. From the View menu, select C/AL Globals. In the TextBox - C/AL Globals window, select the Text Constants tab. Add a new text constant. The Name of the text constant is Text000 and the Value is Placeholder.

    6. In the TextBox - Properties window, find the SourceExpr property. In the Value column, enter Text000.

  4. If the form does not comply with the requirement that a control in the second column must have a row header that is a label with the CaptionML property defined, then you must modify the row header. To modify the row header, do the following:

    1. Delete the existing row header and create a label for the new row header. For more information about how to create a label, see How to: Create Labels.

    2. Right-click the new label and then select Properties.

    3. In the TextBox - Properties window, set the CaptionML property.

  5. If the form does not comply with the requirement that controls in the first row, which are column headers, must be label controls so that you can assign the FixedLayout property, then you must modify the column headers in the first row. To modify the column headers, do the following:

    1. If any of the column headers are not label controls, delete the controls and add labels. For more information, see How to: Create Labels.

    2. Right-click the new label and then select Properties.

    3. In the TextBox - Properties window, set the CaptionML property.

  6. If the form does not comply with the requirement that the first row must be assigned the FixedLayout property, then set the FixedLayout property by using the Transformation Input File (TIF) Editor. For more information, see How to: Set the FixedLayout Property.

  7. Move each matrix-like layout to a separate container so that the form complies with the requirement that fields in a matrix-like layout must be in individual containers. To do this, you must create new containers, such as a TabControls or Frames, and then use Form Designer to add a single matrix-like layout to each container. For more information, see the following topics:

    The following illustrations show form 151, Customer Statistics, in Form Designer, before and after redesign.

  8. To save and compile your form, close the form in Form Designer. In the Save Changes window, confirm that the Compile check box is selected, and then click Yes.

See Also