To create and modify client report definition (RDLC) report layouts, you must use Visual Studio. When you create an RDLC layout for a report, you may have to perform some steps in Classic client Report Designer to modify the dataset and some steps in Visual Studio Report Designer to modify the layout. To work with both Classic client Report Designer and Visual Studio Report Designer, you must know when and where to save your work and how to switch between them efficiently.
You can save changes to the RDLC report layout of the report in Visual Studio multiple times and then return to Classic client Report Designer and load the changes that you made to the layout into the report. In Microsoft Dynamics NAV 2009 R2, you can save and compile changes to the report dataset in Classic client Report Designer multiple times and then return to Visual Studio Report Designer and reload the dataset into the report layout.
To switch between Classic client Report Designer and Visual Studio Report Designer, we recommend that you follow these steps:
- Before you switch from Visual Studio Report
Designer to Classic client Report Designer, save the report.rdlc
file. You can also build the report in Visual Studio before you
switch to the Classic client, but this is not required.
- Before you switch from Classic client Report
Designer to Visual Studio Report Designer, save and compile the
report.
- After you update the dataset in Classic
client Report Designer, you must refresh the dataset result in
Visual Studio Report Designer. In the Website Data Sources
pane, expand DataSet, right-click Result, and then
click Refresh.
- If you rename a field in Classic client
Report Designer, then you must update all instances of that field
in Visual Studio Report Designer layout. Otherwise, the report will
not successfully compile.
- If you delete a field in Classic client
Report Designer, then you must delete all instances of that field
in the Visual Studio Report Designer layout. Otherwise, the report
will not successfully compile.
The following procedure describes how to switch between Classic client Report Designer and Visual Studio Report Designer.
To work with both Object Designer and Visual Studio Report Designer
-
In the Classic client, on the Tools menu, click Object Designer.
-
To either create or modify an RDLC report, do one of the following steps:
- To create a new RDLC report layout for a
report, in Object Designer, click Report, select the
report, and then click Design. On the Tools menu,
click Create Layout Suggestion.
- To modify an existing RDLC report layout, in
Object Designer, click Report, select the report that
you want to modify, and then click Design. On the
View menu, click Layout.
- To create a new RDLC report layout for a
report, in Object Designer, click Report, select the
report, and then click Design. On the Tools menu,
click Create Layout Suggestion.
-
After you make changes in the RDLC layout, in Visual Studio, on the File menu, click Save Report.rdlc.
-
In the Classic client, select an empty line in the report in Report Designer. A dialog box opens with the following message:
The layout of report id: ' <report ID> ' is changed by another application.
Filename of the changed RDLC: <filename>
Do you want to load the changes?
-
Click Yes to load the changes that you made to the RDLC layout into the Classic client.
-
In the Classic client, on the File menu, click Save.
-
In the Save dialog box, select Compiled, and then click OK.
Note If you try to close the report in Object Designer in the Classic client, then you see the following error: You must close the Visual Studio Designer window before closing the report object. Note If you try to view the layout when the report layout is already open, then you see the following error: The report layout is already open in Visual Studio. -
In Classic client Report Designer, make some additional changes to the report dataset.
-
In the Classic client, on the File menu, click Save.
-
In the Save dialog box, select Compiled, and then click OK.
Important If you save the report but do not compile it or if you compile the report but do not save it, then you cannot load the changes into the RDLC report layout in the following step. You must both save and compile the report. -
Go to the Visual Studio Report Designer. You see the following message: This file has been modified outside of the source editor. Do you want to reload it? Click Yes or Yes to All to reload the changes from Classic client Report Designer into the RDLC report layout.
-
In Visual Studio, in the Website Data Sources pane, expand DataSet, right-click Result, and then click Refresh. The additional items that you added to the dataset in Section Designer in the Classic client are displayed in the Visual Studio dataset.
-
You can continue making changes in either Visual Studio Report Designer or Classic client Report Designer without having to close either designer. You must save and compile the report object after you make changes and load the changes into the report object or the RDLC report layout when you are prompted.