Walkthrough: Designing a Customer List Report

In Microsoft Dynamics NAV 2009, the process of creating new reports is divided into three phases:

  • Defining the data model on which the report is based.

  • Defining grouping and totaling for the report.

  • Designing the visual layout of the report.

With Microsoft Dynamics NAV, you can use Visual Studio Report Designer to design and edit the visual layout of a report.

About This Walkthrough

This walkthrough provides an overview of how to create a report that is based on one table with Microsoft Dynamics NAV and design this report using Visual Studio Report Designer. This walkthrough illustrates the following tasks:

  • Create a report in Microsoft Dynamics NAV.

  • Apply sorting criteria and filters on the report in Microsoft Dynamics NAV.

  • Design the layout of the report in Visual Studio.


To complete this walkthrough, you will need:

Defining the Data Model

When you create a new report, you must define where the data that the report will display should come from. You define the data model in Microsoft Dynamics NAV.

To define the data model

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

  2. In Object Designer, click Report, and then click the New button to open the New Report window.

  3. In the Table field, click the drop-down arrow, and then select the Customer table in the Table List window.

  4. Select Create a report using a wizard, and then choose Tabular-Type Report Wizard. Click OK.

  5. In the Tabular-Type Report Wizard, select the No., Name, Address, and Phone No. fields, and then click Next.

  6. Accept the default selection for the report in the next windows.

  7. Click the Finish button, and the Report Designer window opens.

Applying Sorting Criteria and Filters

Next, you must decide what sorting criteria and filters that can be used in the report. This report will sort the customers in ascending order by customer number and have a filter for searching by customer number and country/region code.

To set the report properties

  1. In Report Designer, select the Customer data item.

  2. On the View menu, click Properties.

  3. In the Properties window, select the DataItemTableView property, and in the Value field, click the drop-down arrow to open the Table View property.

  4. Select the No. field as the key, and then set the sort order to Ascending. Click OK.

  5. In the Properties window for the Customer data item, select the ReqFilterFields property, and in the Value field, click the drop-down arrow to open the Field List window.

  6. Select the No. and Country/Region Code fields, and then click OK.

  7. On the File menu, click Save As.

  8. Give the report ID 55551 and the name CustomerList.

  9. Click OK to save and compile the report.

Designing the Report Layout

After you have saved and compiled the report in the Classic client, you must transform the layout and open it in Visual Studio. You can then use Visual Studio to edit and design this report. For this report, you will set the header to use a larger font and the company name to use the red font color.

To design the layout of the report

  1. In the Classic client, in Object Designer, locate the CustomerList report, and then click the Design button.

  2. On the Tools menu, click CreateLayout Suggestion. Visual Studio opens and displays the current layout of the report.

  3. In the Page Header section of the layout, click the CustomerCaption1 text box.

  4. On the View menu, click Properties Window.

  5. In the Properties window, expand the Font property and select FontSize. Set FontSize to 12pt.

  6. In the Page Header section of the layout, click the COMPANYNAME1 text box.

  7. On the View menu, click Properties Window.

  8. Set the Color property to Red.

  9. Save the report in Visual Studio.

  10. In the Classic client, open the same report in Report Designer. A message informs you that the .rdlc file for this report has changed and asks if you want to load the changes. Click Yes to save the changes in the database.

  11. Compile the report.

  12. Click Run to run the report from the Classic client.

  13. To view the changes that you made in Visual Studio, run the report in the RoleTailored client. For more information about running a report in the RoleTailored client, see How to: Use a Shortcut to Run a Report.

Next Step

  • Now you have created a report that lists customers sorted by customer number, and you have added a few changes to the report layout using Visual Studio. The next step is to add the customer list report to a page in the RoleTailored client from where it can be run. For more information, see How to: Make a Report Available in the RoleTailored Client.

See Also


How to: Make a Report Available in the RoleTailored Client
Walkthrough: Creating a Link from a Report to a Page
Walkthrough: Designing a Report with Images, Interactive Sorting, and Visibility Toggle
Walkthrough: Designing a Customer Sales Order Report