ForNAV and Docker Containers

You can use Reports ForNAV with your Docker containers. The following is a step-by-step example of how to set up a container that supports ForNAV reports.

Install the NAV Container Helper

To help install your container, you must install the NAV Container Helper PowerShell module.

install-module navcontainerhelper -force

get-command -Module navcontainerhelper

Write-NavContainerHelperWelcomeText

Create the container

Now you can create the container with the New.NavContainer command.

New-NavContainer -accept_eula -containerName “bc150” -auth NavUserPassword -imageName “mcr.microsoft.com/businesscentral/onprem” -useSSL -updateHosts -licenseFile “C:\temp\license.flf”

You can omit the -useSSL if you don’t need to use https.

Add fonts to the container

To be able to use more fonts than just the Courier font in reports, you must add some of your local fonts to the container.

Add the Arial font:

Add-FontsToBCContainer -containerName bc150 -path c:\windows\fonts\arial*.ttf

Or, add all fonts from your local machine:

Add-FontsToBCContainer -containerName bc150 -path c:\windows\fonts\*.ttf

Install the certificate

This stop is only needed if you created your container with -useSSL.

Download the self-signed certificate from the certificate URL shown when you created the container. The URL in this example is http://bc150:8080/certificate.cer

Install the downloaded certificate under Trusted Root Certification Authorities. For more information on this, please see https://www.fornav.com/knowledge-base/trusted-certificates/

Install the ForNAV Runtime

This step is optional. From ForNAV 5.0.0.1805 and later, the Designer uploads and installs the ForNAV runtime DLL on the on-premise service tier if it is not there already. It installs it in the temporary files folder belonging to the service tier.

In a production environment, you must still copy the runtime DLL to the add-ins folder under the service tier. Otherwise, you can risk that it is deleted if the temporary files are deleted.

Copying the runtime DLL to the service tier is relatively easy. Here is an example:

docker exec bc150 cmd.exe /c mkdir “C:\program files\microsoft dynamics nav\150\service\add-ins\ReportsForNAV_5_2_0_1883”

Copy-FileToNavContainer -containername bc150 -localpath “C:\Program Files\Reports ForNAV\Add-ins\ReportsForNAV\ForNav.Reports.5.2.0.1883.dll” -containerpath “C:\program files\microsoft dynamics nav\150\service\add-ins\ReportsForNAV_5_2_0_1883\ForNav.Reports.5.2.0.1883.dll”

Configure the ForNAV Designer

You can now connect to your Docker container from the ForNAV Designer.

Enter values that point to your Docker and click Test. Now you can start designing reports.