Microsoft Dynamics NAV

Designing A Custom Report Layout in Word (NAV 2017)

Posted on Posted in Microsoft Dynamics NAV

A Word Custom Report Layout is a design in Microsoft Word, what acts as a template for viewing or printing from Microsoft Dynamics NAV clients. A custom XML part is used to map the data into Word Custom Report Layout at run time, what represents the dataset of a Microsoft Dynamics NAV report.

In Microsoft Dynamics NAV Development Environment, you can create or modify built-in Word report layouts on report objects. The layouts that you create on reports in the development environment will then become part of the report objects in the database.

From the Microsoft Dynamics NAV clients, Microsoft Dynamics NAV users can manage the Word report layouts that are used on reports. This includes adding a built-in Word report layout, creating custom Word report layouts on a report, and changing which report layout is currently active on a report.

Please refer below for a simple demonstration:

  1. Create a new report in Microsoft Dynamics NAV Development Environment, then add fields into the report as shown below:


  1. Go to Properties of each field, change Include Caption to TRUE so that captions will available in the report dataset.


  1. It’s time to create a Word Layout for this report. Go to New Word Layout as shown as below, if Word Layout already exist then you should find that New is inactive.
  2. Export the Word Layout as shown above in the screenshot and save it in somewhere on your PC.
  3. Open the exported Word Layout and add Developer Menu from Customize Ribbon Option if you can’t find it in Microsoft Word’s ribbon.
    Go to File -> Options – > Customize Ribbon -> Developer


From Developer Option -> Choose XML Mapping Pane -> Display Custom XML Part

In the XML Mapping pane, in the Custom XML Part list, select the XML Part for Microsoft Dynamics NAV report. The name of the XML part has the following format:


Now you can see the XML Dataset Part.
Label groups include all the captions of fields (Property IncludeCaption = True)

Sales Header and Sales Line DataItem with fields as shown below:


  1. To add a label or field to word layout, you need to place your mouse pointer in the document where you wish to add the control. Then, in the XML Mapping pane, right click the field that you want to add, choose Insert Content Control, then choose Plain Text.

You can’t type the dataset field name manually in the content control, use of XML Mapping pane to map the field is a MUST. Do not use Rich Text because it’s not fully supported yet.



Repeat the same for all other fields.

  1. To add repeating rows (list), you need to add a table row what includes column for each field that you want to repeat. Table rows will act as a placeholder for repeating fields.


  1. Select the whole table row, in the XML Mapping pane, right click the DataItem which contained fields you want to repeat, choose Insert Content Control then choose Repeating.


  1. Insert the field as Plain Text Control into the table column.



  1. Save the Word Layout once you finish the design.
  2. Import the Word Layout by select the saved report layout. Alternatively, you can create a new Custom Report Layout and Import the Layout.


  1. Run the report and see the result.

4 thoughts on “Designing A Custom Report Layout in Word (NAV 2017)

  1. I think this is one of the most vital information for me. And i’m glad reading your article. But wanna remark on few general things, The website style is perfect, the articles is really great :D. Good job, cheers

  2. Hey! This post couldn’t be written any better! Reading this post reminds me of my old room mate! He always kept chatting about this. I will forward this article to him. Fairly certain he will have a good read. Many thanks for sharing!

  3. Greate article. Keep posting such kind of info on your site.

    Im really impressed by your site. You have performed an incredible job. I’ll definitely digg it and for my part suggest to my friends. I am confident they will be benefited from this website.

Leave a Reply

Your email address will not be published. Required fields are marked *