Error Message: 'Variable LasernetPrinter Has not Been Declared'
    • 27 Mar 2025
    • 1 Minute to read
    • Contributors
    • PDF

    Error Message: 'Variable LasernetPrinter Has not Been Declared'

    • PDF

    Article summary

    This article provides a solution to the following compilation error:

    Error

    Variable LasernetPrinter has not been declared.

    This compile error occurs due to either DLL files:

    • Being unavailable on the AOS server.

    • Missing on the AX client.

    Therefore, DLL files must be deployed to the AOS server and AX client.

    Info

    If AX throws an error when it tries to deploy the DLL files to the AOS, the system will create an entry in the event log.

    In the following example, the system could not save the file LasernetPrinter.Data.dll to the AOS servers Bin folder (C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\):

    Resolution

    The following DLL files need to be in the AOS server and client Bin folder in order to compile correctly:

    • LasernetEvent.dll

    • LasernetPrinter.dll

    • LasernetPrinter.Data.dll

    If this does not work, you can try to manually deploy it from the AX client.

    Follow these steps to do so:

    1. Right-click AX client and click Run as administrator.

    2. Navigate to Lasernet > Setup > Resource deployment.

    3. Click Deploy resources, and then select Deploy resources.

    If this fails, you will get an Infolog.

    The following image shows an example of DLL files missing from the AOS server:

    If all this fails, you can try to copy the DLL files manually.

    Warning

    This is only recommended for testing purposes.

    1. Right-click the AX client and click Run as administrator.

    2. Navigate to Lasernet > Setup > Resource deployment.

    3. Select the DLL files one by one and click the Download resource button.

    1. Stop the AX client and the AOS server.

    2. Copy the DLL files into their Bin folders, for instance: C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\ and C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin

    Problems with the DLL files normally occur due to missing user rights to the Bin folder, for example, on the client if you are not a local admin.


    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.