Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've written a VB.NET (2010) desktop application that will allow a user to either open an existing QlikView document and refresh its data or create a new QlikView document (both in the QlikView application via the Interop.QlikView.dll).
This is the code:
Dim strReportPath As String = "myTest.qvw"
Dim myQV As New QlikView.Document
If Not File.Exists(strReportPath) Then
Dim myApp As New QlikView.Application
myQV = myApp.CreateDoc()
Dim myProps As QlikView.IDocumentProperties = myQV.GetProperties
myProps.Script = myProps.Script & strLoadScript
myQV.SetProperties(myProps)
myQV.SaveAs(strReportPath)
myQV.CloseDoc()
End If
myQV = GetObject(strReportPath)
myQV.Reload()
This code works like a charm on my machine. I have installed it and cannot duplicate the error. However, when I install it on another machine for testing (via a standard .NET installer), I recieve the 'Retrieving the COM class factory..' error. Both machines are running the 32-bit version of the Personal Edition 11.0.11440.0 SR2. I have tried copying the Interop.QlikView.dll locally and even registering it. Nothing has worked. Has anyone else run into this problem? What am I missing?
What is the CPU affinity (or target CPU platform) for you application?
Try changing the CPU target to 32bit and rebuild.
Everything is setup for x86 (32-bit).
Sorry, I've not seen this error in this context, so just suggesting an idea.
If the Test machine is running the same flavor of OS (x86 or x64) as your Development machine, and both have identical QV desktop/OCX installs, then my suggestions run dry.
When I try to manually register the Interop.QlikView.dll, I get the following message:
The module "C:\Interop.QlikView.dll" was loaded but the entry-point DllRegisterServer was not found. make sure that C:\Interop.QlikView.dll is a valid DLL or OCX file and try again
That suggests that Interop.QlikView.dll does not have a RegisterServer method. So I'd try just copying to your application folder (or to C:\Windows\System32 if x86 OS, or to C:\Windows\SysWOW64 if x64 OS).
Is the Interop.QlikView.dll an assembly created from the QlikView.OCX file? Have you tried using RegAsm to regsiter this (if this is a .NET assembly)? On your development machine, the registration would have been done for you by your VS.net installation. But you may need to register the assembly on the other machine.
Donald - I tried both. Unfortunately, neither worked. RegAsm gives the exact same error as regsvr32. The Interop.QlikView.dll is generated when you add a reference to Qv.exe in your Project Properties References tab.
Do you have a file IEShims.dll in C:\Programs Files\Internet Explorer?
And is C:\Program Files\Internet Explorer in your PATH?
Playing around with Dependency Walker on Interop.QlikView.dll and this appears suspect.