LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -4 from NIReport_New function

Solved!
Go to solution

I'm getting a "NON-FATAL RUN-TIME ERROR" from my application when I try to open a new report with the NIReport drivers.  The error code is -4 (0xfffffffc) which is defined in the nireport.h file as follows:

 

#define NIR_ERR_UnknownAutomationError      -4L     // Misc/unknown error calling method

 

I'm guesiing there might be something wrong with the NIReports ActiveX Automation server which is required to use NI reports but I don't know how to check if it's functioning.  I've done a complete re-installation of CVI but the error is still there.  Does anyone have any ideas what could be happening?

0 Kudos
Message 1 of 5
(4,124 Views)

Hey Brent,

On what function call are you seeing this error? Also, when you say that you did a complete "reinstallation" does this mean that you repaired your installation or that you did a complete uninstall and reinstall?

 

Lastly, does the error also occur when you try and run one of our shipping CVI report examples? Here is where they are located:

 

C:\Documents and Settings\All Users\Documents\National Instruments\CVI90\samples\reportgen\nirsample.cws

 

Lars

0 Kudos
Message 2 of 5
(4,087 Views)

Lars,

 

The error occurs when my application gets to the following function call: 

 

NIReport_New (&RPT_Handle);

 

The function is suppose to return a non-negative integer report handle.

 

I did a complete uninstall and reinstall of CVI.

 

I didn't try any of the report samples but did as you suggested.  The same error is generated from the sample code at the same function call.

 

if (NIReport_New (&reportHandle) < 0) {
        MessagePopup ("ERROR", "Could not initialize NI Reports...");
        return -1;
    }

 

 

Some additional information about my system.  I have the following NI software installed listed in chronological order of when it was installed on my PC:

 

LabView 5.1.1

LabWindows CVI 8.1.1

TestStand 4.1.1

TestStand 4.0

Uninstalled and reinstalled CVI 8.1.1

 

 

0 Kudos
Message 3 of 5
(4,083 Views)

Lars,

 

I took the uninstall/reinstall of CVI method a bit further by removing all NI software from my machine before installing CVI 8.1.1.  The NIReport functions work perfectly now.  There must be a compatibility issue between some of the NI software packages which was causing the problem.  I'm guessing the LabView 5.1.1 is the source of the problem but I'll need to reinstall each NI package until I found out which one breaks the NIReport drivers.  I'll update this message thread with the results.

0 Kudos
Message 4 of 5
(4,054 Views)
Solution
Accepted by Brent4518
It's LabView 5.1.1 that causes this error with the NIReport drivers.  LabView 5.1.1 can not be installed on a system trying to use LabWindows CVI 8.1.1 version of the NIReport drivers.
Message 5 of 5
(4,041 Views)