Install the ForNAV Report Service on Docker

With the new addition of the Report Service, you also need to install it when you want to run ForNAV in a Dockerized Business Central installation. To do this you:

  • Build your Business Central container but open port 8080 as well.
  • Copy the ForNAV installer and the universal code extension files
  • Install the ForNAV Report Service using PowerShell Install and the ForNAV Universal Code extensions using PowerShell.

Step 1

Simply build your containers as usual.

Step 2

Copy the ForNAV files to your Docker container. To do this, you can use the Docker Copy command:

docker stop $containerName
$dest = "{0}:\{1}" -f $containerName, 'ForNAVUC'
docker cp '<path to the folder with the installer, app files and script>' $dest


 

Step 3

Run the installer using PowerShell. Open the Docker Containers PowerShell command prompt and run this script:

Start-Process -FilePath .\ReportsForNAV_7_0_0_2382.exe -ArgumentList /COMPONENTS=”deployment\reportservice", /VERYSILENT, /NORESTART, /SUPPRESSMESSAGEBOXES, /LOG=".\fnlog.txt"


 

You can find all the ForNAV installer command line switches here: https://www.fornav.com/knowledge-base/installer-command-line-switches/

Step 4

Install the ForNAV Universal Code extensions using PowerShell. You can use the normal Business Central PowerShell commands for this. This is an example:

# Sample install script
# This is a simplified example, which does not do other operations that may be needed.
# The administration module must be loaded for this script to run.
$dllVersion = "7.0.0.2391"
$appVersion = "7.0.0.8"
$instance = "BC"

function InstallApplication($path, $name, $version) {
    Write-Host "Install $name"
    Publish-NAVApp -ServerInstance $instance -SkipVerification -Path $path
    Sync-NAVApp -ServerInstance $instance -Name $name -Version $version -Mode Add -Force -ErrorAction Stop
    Install-NAVApp -ServerInstance $instance -Name $name -Version $version
}

Start-Process -FilePath .\ReportsForNAV_7_0_0_2382.exe -ArgumentList /COMPONENTS=”deployment\reportservice", /VERYSILENT, /NORESTART, /SUPPRESSMESSAGEBOXES, /LOG=".\fnlog.txt"

InstallApplication ".\ForNAV Language Module $appVersion.app" 'ForNAV Language Module' $appversion
InstallApplication ".\ForNAV Core $appVersion.app" 'ForNAV Core' $appversion
InstallApplication ".\ForNAV Customizable Report Pack $appVersion.app" 'Customizable Report Pack' $appVersion
InstallApplication ".\ForNAV Service (experimental version using HTTP service) $dllVersion.app" 'ForNAV Service' $dllVersion


 

After running the installation script, the ForNAV reports might still not run and you could get the following error: The ForNAV Report Service config file C:\ProgramData\ForNAV\Report Service\Configuration\Report Service.json not found :

You can solve this by copying the configuration file manually from a computer that has the ForNAV Report Service installed:

$dest = "{0}:\{1}" -f $containerName, 'ProgramData\ForNAV\Report Service'
docker cp "C:\ProgramData\ForNAV\Report Service\Configuration" $dest