Problem loading a report in .Net dll running in ActiveX context

Stimulsoft Reports.NET discussion
Post Reply
ChristianMyksvoll
Posts: 18
Joined: Thu Sep 22, 2011 8:42 am
Location: Norway

Problem loading a report in .Net dll running in ActiveX context

Post by ChristianMyksvoll »

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?
Attachments
1368.stacktrace.png
1368.stacktrace.png (14.56 KiB) Viewed 1623 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Problem loading a report in .Net dll running in ActiveX context

Post by HighAley »

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.
ChristianMyksvoll
Posts: 18
Joined: Thu Sep 22, 2011 8:42 am
Location: Norway

Problem loading a report in .Net dll running in ActiveX context

Post by ChristianMyksvoll »

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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Problem loading a report in .Net dll running in ActiveX context

Post by HighAley »

Hello.
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.
We are glad to work with such costumers.

Let us know if you need any additional help.

Thank you.
Post Reply