Microsoft Word Document Reports in Dynamics NAV and Dynamics 365 for Financials (Project Madeira)


In Microsoft Dynamics NAV and Project Madeira, it is possible to use Microsoft Word 2013 or later to modify the report layout to some extent . Customers can edit/modify the report layout in Microsoft word document and this editing experience is WYSIWYG. This feature makes it easy for customers to modify their reports and save them without touching the underlying report objects.

This feature becomes all the more important in Project Madeira! Which is why, I decided to write about this feature. I will be using screenshots from Project Madeira in this blog. However, it matches pretty much with Dynamics NAV as well:)

Its important to know that reports in NAV and Madeira can have RDLC layout or Word Layout and some reports have both layouts.

In Project Madeira, search for page Report Layout Selection and open the related page from the list

Search Report Layout Selection

This page lists all the printable reports available in the product and the layout which is being used for a report.

List of Reports in Report Layout Selection page

In the Report Layout Selection page, you can select the required layout for a report. You have the option of choosing the layout by clicking on Selected layout option for a report.

The available options for layout are:

  • RDLC (built in) – Available for all the printable reports.
  • Word (built in) (if available) – Available by default with few reports like 1304 (Sales – Quote), 1305 (Sales – Confirmation), 1306 (Sales – Invoice), 1307 (Sales – Credit Memo)
  •  Custom Layout (if available)  – Custom layouts are modified version of built in layouts or it can be a new layout built from scratch by the users.

The Report Layout Selection page also lets the user choose the layout that they prefer per company. Meaning, if there are 3 companies, all three companies can have different layout selected for the same report. For example: A sales invoice report in Company A, Company B and Company C can all have different layouts/formats from each other even though the underlying report object is the same.

Let’s explore 1306 (Sales – Invoice) report: In Report layout selection page, search for 1306 or Sales – Invoice, choose selected layout as RDLC (built in) and click on Run Report action on top.

Capture3

In the request page window, select an Invoice No. and click on Preview to view the Report output with RDLC layout.

Capture4

Similarly, in Report Layout Selection page, Change the  Selected Layout to Word (built in)/ Custom Layout (In case of Custom layout choose one of the available custom layouts from the list) and preview the reports in respective formats.

Below is the comparison of 3 layouts of the same report:

Capture5

In Madeira/NAV, you can have multiple custom layouts for the same report and users can modify these custom layouts or create new custom layouts for a report.

In the Report Layout Selection Page, Select the 1306 (Sales – Invoice) Report and click on Custom Layouts action to view/edit/create custom layouts for this report. The Customer Report layouts page lists all the custom layouts for Report 1306 (Sales – Invoice).

Editing an existing custom layout:

Select the one of the custom layout which needs to be modified and click on Export Layout.

Capture7

This exports/opens a word document which is nothing but report layout designer in word document. you will be able to edit this document (Change the colour, font, remove fields, add fields etc..) and import it back into the system by using the Import Layout option in Custom Report Layouts page.

Creating a new custom layout:

You can create a new custom layout by using New/Copy options in Custom Report Layouts page. Click on New and it opens the below window. Select the Insert Word Layout option if you would like to copy the Word (built in) layout as a base for your new layout (If you do not select Insert Word Layout option, you will have to build the whole layout from scratch). Click on ok to create a new custom layout.

Capture8

The New custom layout will be available with Description Copy of Built-in layout. You can modify the description to something better of course.

Capture9

To make changes to the new layout, export the layout and edit the layout in word document and import it back.

Editing the exported word layout document file:

The below picture shows an example of the exported word layout file:

Capture10

In Microsoft word, we can edit this file. For example:

  1. Change the customer address font to Blue and bold.
  2. Insert a new Table style for the line items
  3. Add company phone number below the company address and make the phone number bold

The above changes can be done in Word document and below picture shows the word layout file after the modification:

Capture11

Note: In the word layout, you can add fields from NAV/Madeira into the report if the required field(s) exists in the report dataset. (To find the dataset, click on the Developer tab –> XML Mapping Pane –> Choose the right Custom XML part from the drop down). In the word layout, select/click where you want to add the new field (place the cursor in the right place), select the field from the dataset under XML Mapping (Right click on the required field –> Insert Content Control –> Plain text).

After the changes are completed in word layout file, save the file and import it into NAV/Madeira using Import Layout option in Custom Report Layouts Page. After importing, you can run the report to view the changes:

Capture12

Similarly, to create a completely new custom layout, In Custom Report Layouts page, Click on New–> Insert Word Layout=No –> OK. This opens a blank word document. Click on Developer tab –> XML Mapping Pane to access the fields in the report dataset. With this, you will be able to create a new layout and place the fields where you need it.

More details on Adding Fields to a Word Report Layout at: https://msdn.microsoft.com/en-us/library/dn757229(v=nav.90).aspx

Thank you.


Comments (1)

Skip to main content