Dynamics NAV

Thursday, 15 January 2015

What's New in Microsoft Dynamics Reports in NAV 2015

In previous versions of Microsoft Dynamics NAV, you could only design the layout of reports by using Visual Studio

Report Designer or Microsoft SQL Server Report Builder. With Microsoft Dynamics NAV 2015, you can design
report layouts by using Microsoft Word 2013. Word report layouts are built on Word custom XML parts that 
dynamically map a report dataset into a report at runtime.

Customizing and Managing Report Layouts from the Microsoft Dynamics NAV Clients

You can customize Word and RDLC report layouts from the Microsoft Dynamics NAV Windows client and Microsoft 
Dynamics NAV Web client by using Word 2013 and SQL Server Report Builder, respectively. This enables users can
make variations of layouts, and then use the variations when viewing and printing reports as needed.

There are the  following new report functions have been added in Microsoft Dynamics NAV 2015 to support new report 
layout implementation.

SAVEASXML:                  Saves a report as an .xml file on the computer that is running Microsoft Dynamics NAV Server.
WORDXMLPART:            Returns the report data structure as structured XML that is compatible with Word Custom XML parts.
WORDLAYOUT:               Gets the Word report layout that is used on a report and returns it as a data stream.
RDLCLAYOUT:                Gets the RDLC layout that is used on a report and returns it as a data stream.
HASCUSTOMLAYOUT:    A function in codeunit 1 that determines whether a report has an active custom Word layout or RDLC layout at run time.
MERGEDOCUMENT:        A function in codeunit 1 that loads the custom Word layout that is active on report and renders it in the targeted format, such as Word, PDF.
REPORTGETCUSTOMRDLC : A function in codeunit 1 that loads the proper custom RDLC layout for a report at run time and uses the layout to render the report.


We can design the Layout in Word































Output will be shown below


How to Identify Client Type from C/AL Code

The following Microsoft Dynamics NAV clients interact with the Microsoft Dynamics NAV database through Microsoft Dynamics NAV Server:

  • Microsoft Dynamics NAV Windows client
  • Microsoft Dynamics NAV Web client 

If we have to differentiate development for Windows Client and Web Client then how to identify the client from 
c/AL code?

We have 2 functions available in Codeunit 419 - File Management called IsWindowsClient and IsWebClient.