Export (0) Print
Expand All

How to: Format Decimal Values

When you create a client report definition (RDLC) layout for a report, a format variable is created for each decimal variable. The format information from the Classic client report layout is stored in the format variable. Decimal values that exist on the Classic report layout will be formatted in the RDLC layout by using the format variable. If you create new controls that use decimal values in an RDLC report layout, then you must manually specify to use the format variable instead of the original decimal variable to get the formatted decimal variable.

Before you begin this procedure, you must create a layout suggestion for the report. For more information, see How to: Create a Layout Suggestion.

To format decimal values

  1. In the Classic client, on the Tools menu, click Object Designer.

  2. In Object Designer, click Report, select a report that you want to modify, and then click Design.

  3. On the View menu, click Layout.

  4. In Visual Studio, in the report.rdlc file, right-click the text box that displays a decimal value, and then click Properties.

  5. In the Properties window, click the Format tab.

  6. In the Format code field, verify that the variable used is the variable with _Format appended to the name. For example, if the Value field on the General tab is =Fields!CustSalesLCY_2_.Value, then the Format code field on the Format tab should be =Fields!CustSalesLCY_2_Format.Value.

  7. If the variable used is not the variable with _Format appended to the name, then you must change the variable. To change the variable, do the following steps:

    1. To select the format variable from a list, click the ellipsis button (…) next to the Format code field.

    2. In the Choose Format window, click the function button (fx) next to the Custom field.

    3. In the Edit Expression window, select Fields (DataSet_Result), select the variable from the list, and then click OK.

See Also

Community Additions

ADD
Show:
© 2015 Microsoft