Whether you are using an RDLC report layout in Visual Studio or a Word report layout, if you want to add a label to the report layout, such as a caption for a field, a title for a chart, or a title for the report, then the label must be included in the report dataset. You add labels to the dataset by using Report Dataset Designer in Microsoft Dynamics NAV Development Environment. You can either add labels that are related to column of a data item in the dataset, such as the caption for a table field, or labels that are not related to a column of a data item, such as the title of the report. After you add a label to the dataset, you add to the report layout.
To add a label that is related to a column of a data item
In the development environment, on the Tools menu, choose Object Designer.
In Object Designer, choose Report.
Select a report, and then choose the Design button.
In Report Dataset Designer, do one of the following:
-
Select the Include Caption check box for a Column data type row to add a label for the column.
-
Select a Column data type row for which you want to add a label to the dataset, and on the View menu, choose Properties. In the Properties window, set the IncludeCaption property to Yes.
-
Select the Include Caption check box for a Column data type row to add a label for the column.
Compile and save the report.
To add the label to a report layout, see one of the following procedures.
To add a label that is not related to a column of data item
In the development environment, on the Tools menu, choose Object Designer.
In Object Designer, choose Report.
Select a report, and then choose the Design button.
In Report Dataset Designer, on the View menu, choose Labels.
In Report Label Designer, in the Name field, add a Common Language Specification (CLS)-compliant name for the label. This name is used in the Visual Studio dataset. For more information, see the "Naming" section in Common Language Specification in the MSDN Library.
In the Caption field, enter the caption.
Note The default language of the caption depends on the current language of the development environment. For more information, see Caption Property. On the View menu, choose Properties.
If you have a multilanguage application, then in the Properties window, specify values for the CaptionML property.
Compile and save the report.
To add the label to a report layout, see one of the following procedures.