We are trying to integrate Stimulsoft Reports into one of our older VB6 ActiveX projects, and we have run into a problem when trying to load a report. Check the attached image for stack trace.
This is how we trigger Stimulsoft Reports:
1) An ActiveX DLL is opened in Internet Explorer
2) When clicking a button in the ActiveX, we create a .Net object from a .Net DLL. VB6 code below:
Set externalObject = CreateObject("DotNetComObject")
externalObject.Start
3) The .Net object opens a new WinForm
4) When clicking a button in the WinForm, the Stimulsoft Report Designer opens. VB.Net code below:
Dim report As New StiReport()
Dim bytearray As Byte()
bytearray = System.IO.File.ReadAllBytes("c:\temp\report.mrt")
report.Load(bytearray)
This works correctly when creating the .Net object in a .Net application, but when using Stimulsoft Reports in an Internet Explorer/ActiveX context, StiReport.Load fails. We have tried loaded the report file into a byte array and then loading the report from the byte array to make sure it had nothing to do with file access.
Any clues on how to solve this?
Problem loading a report in .Net dll running in ActiveX context
-
- Posts: 18
- Joined: Thu Sep 22, 2011 8:42 am
- Location: Norway
Problem loading a report in .Net dll running in ActiveX context
- Attachments
-
- 1368.stacktrace.png (14.56 KiB) Viewed 1625 times
Problem loading a report in .Net dll running in ActiveX context
Hello.
Officially we don't support ActiveX and VB6.
But if you send us a sample project to reproduce your issue, we'll try to find out the reason.
Thank you.
Officially we don't support ActiveX and VB6.
But if you send us a sample project to reproduce your issue, we'll try to find out the reason.
Thank you.
-
- Posts: 18
- Joined: Thu Sep 22, 2011 8:42 am
- Location: Norway
Problem loading a report in .Net dll running in ActiveX context
Hi.
After some debugging, we found out that the error occured because the VB6 exe file could not find the Stimulsoft DLLs.
If the Stimulsoft DLLs are placed in the same folder as the VB6 exe file or in the Global Assembly Cache, it works correctly.
After some debugging, we found out that the error occured because the VB6 exe file could not find the Stimulsoft DLLs.
If the Stimulsoft DLLs are placed in the same folder as the VB6 exe file or in the Global Assembly Cache, it works correctly.
Problem loading a report in .Net dll running in ActiveX context
Hello.
Let us know if you need any additional help.
Thank you.
We are glad to work with such costumers.cmyksvoll wrote:After some debugging, we found out that the error occured because the VB6 exe file could not find the Stimulsoft DLLs.
If the Stimulsoft DLLs are placed in the same folder as the VB6 exe file or in the Global Assembly Cache, it works correctly.
Let us know if you need any additional help.
Thank you.