Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 ratings:
 5 out of 5     Rate this Document

Why Can't I Run Any NI Reports Examples or Functions In Measurement Studio 6.0?

Primary Software: LabVIEW Development Systems>>Full Development System
Primary Software Version: 6.1
Primary Software Fixed Version: N/A
Secondary Software: Measurement Studio>>Visual C++ Support, Measurement Studio>>Visual Basic Support, Measurement Studio>>.NET Support, Measurement Studio>>Standard Edition (Starter Kit), LabVIEW Development Systems>>Professional Development System, LabWindows/CVI Development Systems>>Base Package, Measurement Studio>>Professional Edition (Base Package), LabWindows/CVI Development Systems>>Full Development System, LabVIEW Development Systems>>Base Package, Measurement Studio>>Enterprise Edition (Full Development System)

Problem: When I run a program using the NiReports functions, it compiles fine. However, it throws an error as soon as I try to access the data members. (See attached screen shot - Debug.jpg below). Why does this occur, and how can I fix this behavior?

Solution: This error occurs if the NiReports.dll file (located in C:\Program Files\National Instruments\Shared\NI-Reports) is overwritten by a LabVIEW installation. For example, if you install Measurement Studio 6.0 and then install LabVIEW 6.1, it will overwrite the Measurement Studio version of NiReports.dll (version 2.1.0.0) with an incompatible version from LabVIEW 6.1.

There are a couple of solutions that will keep this problem from happening on your computer:
  1. Don't install LabVIEW 6.1 on a machine on which you want to run programs that use the Measurement Studio 6.0 NI-Reports component.
  2. Back up the Measurement Studio 6.0 version of the NI-Reports DLL before you install LabVIEW 6.1. Manually register the NI-Reports DLL (see the solution below for instructions) that you need, depending on the application you are running.

If you need to correct this problem on your computer, you can do it with the following steps:
  1. Close ALL open applications.
  2. Open "measurementstudio2.cab" on your Measurement Studio 6.0 CD, and extract out the file "NiReports.dll.02FA89C0_81CC_4586_8ECB_48D58CFAC0B4" to the folder "C:\Program Files\National Instruments\Shared\NI-Reports". (NOTE: You can extract this file using WinZip or some other archiving software).
  3. Open a command prompt window, and enter the following series of commands:

    c:
    cd "C:\Program Files\National Instruments\Shared\NI-Reports"
    regsvr32 /u nireports.dll

    At this point, the problematic version of NiReports.dll has been unregistered. Leave the command prompt window open, you'll use it again in step 5

  4. In Windows Explorer, navigate to the "C:\Program Files\National Instruments\Shared\NI-Reports" folder and rename "nireports.dll" as "nireports.labview.dll"; then rename "NiReports.dll.02FA89C0_81CC_4586_8ECB_48D58CFAC0B4" to "nireports.dll".
  5. Switch back to the command prompt window, and enter the following command to register the Measurement Studio 6.0 version of NiReports.dll:

    regsvr32 nireports.dll

To check that this problem is fixed, try executing one of the NI-Reports shipping examples, like the Microsoft Visual C++ 6.0 example "C:\Program Files\National Instruments\MeasurementStudio\VC\Examples\NiReports\SimpleReport".


Related Links: KnowledgeBase 1HBAMMSR: How Do I Manually Register Type Libraries, ActiveX Controls, and ActiveX Servers?

Attachments:


Debug.jpg


Report Date: 06/18/2003
Last Updated: 12/02/2004
Document ID: 2YHB1CW0

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit