web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Clickonce Nav 2018 - impossible to print anything, nav client closed on error

(0) ShareShare
ReportReport
Posted on by

Hi,

I encounter a major technical issue by using the clikconce client of Nav 2018 (more than one CU) when trying to print.

It's impossible to print anything from any Nav reports, clickonce client is hard-closed by Windows on error.

I obtain the same problem egal that I'm trying to obtain a preview, a normal print, a pdf printing or/and an word/excel printout.

I've tried on more than one computer and the same system based on Nav 2016 works fine on clickonce printing processes.

Any experience on this case anyone?  Report viewer isn't needed anymore?

Help needed, I've deployed the clikconce 2018 for two customers who're locked because of that.

thanks and regards, Yann

Sans-titre.jpg

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gert@lynge.org Profile Picture
    on at
    RE: Clickonce Nav 2018 - impossible to print anything, nav client closed on error

    SQL CLR types is still a mandatory prerequisite component that should be installed on the client PCs (by an administrator). At least if you want to be able to print anything...

    To my knowledge you cannot push it with ClickOnce, but it will be updated trough windows updates/WSUS or whatever you use to keep windows clients up-to-date.

    The installer can be downloaded (there is a link on the ClickOnce html landing page) or installed from the DVD: ...\Prerequisite Components\Microsoft SQL Server Management Objects

    Note: This is actually true even if you don't use ClickOnce - so it is actually not ClickOnce related... But the NAV installer will probably install it automatically...

    Best Regards,

    Gert Lynge

  • jgaztanaga Profile Picture
    225 on at
    RE: Clickonce Nav 2018 - impossible to print anything, nav client closed on error

    THnaks for all your help, I've finally solved it. The issue was that the DLLs were in the root, and also in the language package folders, so I was getting a manifest error. I changed the HelperFunction.ps1 script to copy those files into the root, and create the deployment automatically, and the issue has been solved.

    Now I see another smaller trouble. We have 4 laptops in our office. In 2 of them, everything works correctly, but in the other 2, when we try to print a report, we can see this error:

    click.png

    "cannot represent the result of the report, following error: Cannot load the file or assembly XXX either non of its dependencies. The system cannot find the specified file".

    But now NAV is not clossing.

    Quite strange, probably one problem in the laptops...

    Thank you again!!!

  • Suggested answer
    gert@lynge.org Profile Picture
    on at
    RE: Clickonce Nav 2018 - impossible to print anything, nav client closed on error

    Correct, i don't sign them. I use the Mage.exe command line tool (not mageui.exe), so I'm not sure what application you load it into afterwards?

    First call to mage.exe is only with these parameters -Update and -FromDirectory

    Second call to mage.exe is with these parameters only -Update -AppManifest-AppCodebase

    Best Regards,

    Gert Lynge

  • jgaztanaga Profile Picture
    225 on at
    RE: Clickonce Nav 2018 - impossible to print anything, nav client closed on error

    So in Mage, you are not signing the manifest and the application? If I don't sing the manifest, and load it later into the application, I get an error if I don`t sign it....

  • Suggested answer
    gert@lynge.org Profile Picture
    on at
    RE: Clickonce Nav 2018 - impossible to print anything, nav client closed on error

    2. Add the whole windows client folder to the \Deployment\ApplicationFiles subfolder of the clickonce package directory (except un-needed files (where some of them makes mage.exe error out)

    Everything here "C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client", or just the DLL in the root? Also the dlls on the language packages??

    All files - you need the exe-files etc. as well. But mage.exe will fail on some, so I'm removing those. Also i actually used a lot of effort in finding out exactly which files was needed by trial-error. But that was just because i wanted as small a package as possible... So you can play around with what is needed after you remove those causing mage.exe or the clickonce installer to fail...

    5. Run mage.exe twice to update the Microsoft.Dynamics.Nav.Client.exe.manifest and Microsoft.Dynamics.Nav.Client.application files

    Qhat certific ate are you using to sing the application and the manifest??

    At the moment actually none. The finished package will just show unknown source and warn against installing - but it will still work. I'm planning to get a code signing certificate and to my knowledge not all are working. But you can probably google that. But a missing certificate is probably not your problem if it does not work at all (I'm distributing my click once package from a sub-folder in the NAV help system - as that one is running anyway. So I've had no problems installing non-signed packages from there, even running simple HTTP (no encryption). But off cause that cannot be recommended :-)

    Best Regards,

    Gert Lynge

  • jgaztanaga Profile Picture
    225 on at
    RE: Clickonce Nav 2018 - impossible to print anything, nav client closed on error

    Thanks Gert,

    It's look really similar to what I'm doing. I have some question:

    2. Add the whole windows client folder to the \Deployment\ApplicationFiles subfolder of the clickonce package directory (except un-needed files (where some of them makes mage.exe error out)


    Everything here "C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client", or just the DLL in the root? Also the dlls on the language packages??

    5. Run mage.exe twice to update the Microsoft.Dynamics.Nav.Client.exe.manifest and Microsoft.Dynamics.Nav.Client.application files

    Qhat certific ate are you using to sing the application and the manifest??

    Thank you very much

  • gert@lynge.org Profile Picture
    on at
    RE: Clickonce Nav 2018 - impossible to print anything, nav client closed on error

    I basically:

    1. Copy the ClickOnce template files to a clickonce package directory

    2. Add the whole windows client folder to the \Deployment\ApplicationFiles subfolder of the clickonce package directory (except un-needed files (where some of them makes mage.exe error out)

    3. Add the clientsettings.config file to the \Deployment\ApplicationFiles subfolder of the clickonce package directory

    4. Patch the Microsoft.Dynamics.Nav.Client.exe.manifest and Microsoft.Dynamics.Nav.Client.application template files to replace version, customer name, partner name, install pathc etc...

    5. Run mage.exe twice to update the Microsoft.Dynamics.Nav.Client.exe.manifest and Microsoft.Dynamics.Nav.Client.application files

    ..and I'm done.

    ...and yes, the reportviewer dll's from the Windows client folder ends up in the clickonce package and in the installed directory on the client PC.

    Best Regards,

    Gert Lynge

  • jgaztanaga Profile Picture
    225 on at
    RE: Clickonce Nav 2018 - impossible to print anything, nav client closed on error

    So you aren'nt creating a new manifest? And when running the clickOnce svript, the "report" DLLs are on the needed place?

  • Suggested answer
    gert@lynge.org Profile Picture
    on at
    RE: Clickonce Nav 2018 - impossible to print anything, nav client closed on error

    I use the standard manifest files installed by the NAV 2018 installer when you install the ClickOnce option. I don't change them (besides replacing the customer- and partner name, install path etc.).

    I don't add any file entries in the manifest files myself. I must admit that I've not checked if mage adds them or they are already in the file?

    If you start your NAV using the clickonce package, and you go to windows task manager, and select details. You can rightclick the NAV client process and jump to its directory. That will jump to the random-generated install directory for the clickonce-package (remember it will change every time you push a updated clickonce package).

    If the ReportViewer DLLs are there, i guess they are installed correctly.

    Best Regards,

    Gert Lynge

  • jgaztanaga Profile Picture
    225 on at
    RE: Clickonce Nav 2018 - impossible to print anything, nav client closed on error

    Tthanks four your help Gert.

    I know that, and I located them there. But.. Shouldn't be included also in the manifest file? That is my problem...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans