Error Message when in Custom Designer Control Form

Stimulsoft Reports.Net discussion
Post Reply
codemonkey
Posts: 7
Joined: Fri Jan 17, 2020 3:02 pm

Error Message when in Custom Designer Control Form

Post by codemonkey » Fri May 22, 2020 5:27 pm

Hello!

I built a DLL with complete printing, rendering, filehandling, encryption, databasehandling and a designer form.
When i use the dll with my test Application everything works perfect.
I can call the dll and use it to create, open, edit, save, render and print reports.

If i use the same DLL with the same call from a .net dll loaded into a ACCESS application i can open the designer and see the report but the preview tab is missing and as soon as i move the mouse over the report window i get a unhandled exception. Printing and and rendering + preview of reports works fine.
If i click on continue i can again use the mouse and change datasources or variables but as soon as i hover over the report i get the message again.

Screenshot is in the attachments.
Crossing the red line triggers the exception

First lines of the exception.

Code: Select all

System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei Stimulsoft.Report.QuickButtons.StiQuickButtonHelper.GetQuickButtons(Type type)
   bei Stimulsoft.Report.Design.StiDesignerControl.GetQuickButtons(StiComponent component) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Design\StiDesignerControl.IStiDesignerBase.cs:Zeile 199.
   bei Stimulsoft.Report.Design.Tools.StiSelectToolService.CheckQuickButtons() in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Design\Tools\StiSelectToolService.cs:Zeile 2852.
   bei Stimulsoft.Report.Design.Tools.StiSelectToolService.OnMouseMove(Object sender, MouseEventArgs e) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Design\Tools\StiSelectToolService.cs:Zeile 566.
   bei Stimulsoft.Report.Design.Controls.StiViewControl.OnMouseMove(MouseEventArgs e) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Design\Controls\StiViewControl.cs:Zeile 1501.
   bei System.Windows.Forms.Control.WmMouseMove(Message& m)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   
The Paths in the error message dont exist in my system.

Its probably something stupid on my end.

Do you have any idea how to fix that?

Do you need more information like code of the designer control form?

Greetings and thank you for your help in advance!
Attachments
Error Message.PNG
Error Message.PNG (80.1 KiB) Viewed 214 times
Lech Kulikowski
Posts: 2575
Joined: Tue Mar 20, 2018 5:34 am

Re: Error Message when in Custom Designer Control Form

Post by Lech Kulikowski » Mon May 25, 2020 8:17 am

Hello,

Could you prepare a sample project and send us for analysis?

Thank you.
codemonkey
Posts: 7
Joined: Fri Jan 17, 2020 3:02 pm

Re: Error Message when in Custom Designer Control Form

Post by codemonkey » Fri May 29, 2020 1:48 pm

Hello,

iam not sure if a sample project will help you helping me if my theorie is true:

On my developer testsystems are also sage officeline 8.0 and 8.1 installed. Both uses different versions of the stimulsoft librarys in the GAC and their Library folder.

My testapplication works fine on 8.0 and 8.1 testsystems.

On the 8.0 testsystemsi found Stimulsoft.Base.dll in version 2016.1.28.0 and 2019.1.1.0 (designer error and TypeConverter error)
On the 8.1 testsystemsits version 2018.2.3.0, 2019.1.1.0, 2019.3.5.0 and 2020.1.1.0 (designer error)
in C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Stimulsoft.Base\

On the 8.0 testsytem with the main application i get the "TypeConverter cannot convert from System.String" when executing PrintReport.LoadFromString(ReportString) even though i see only version 2020.02.3.0 stimulsoft dlls loaded in the debugger\module window.
Which is little bit weird since my testapplication works fine.

The access application and .net ddls use some sage officeline dlls.
So my current threorie is that the sage dlls might load their own old version of the stimulsoft dlls (from the GAC and/or the sage officeline application directory) which get used instead of the correct ones.

To fix that i tried to load the correct dlls from the applications directory during runtime with the following code:

Code: Select all

           
           For Each file In FilesInDir
                If file.Extension = ".dll" And file.Name.Contains("Stimulsoft") Then
                    Dim test As System.Reflection.Assembly = Assembly.LoadFrom(file.FullName)
                End If
            Next
But it doesn´t help.

Iam not sure if installing the new stimulsoft dlls to the GAC will help (because sage has stimulsoft dlls in its own directory) or break certain things in sage officeline application.

Do you think my theorie is correct and have any idea how to fix the problem?
Do you still need a sample project?

Thank you for your help!
codemonkey
Posts: 7
Joined: Fri Jan 17, 2020 3:02 pm

Re: Error Message when in Custom Designer Control Form

Post by codemonkey » Tue Jun 02, 2020 3:27 pm

Additional, it works when i put the stimulsoft dlls into the C:\Program Files (x86)\Microsoft Office\Office15 folder. But only when i disable the above code that loads the same dlls from the directory where my dll runs.

In all cases, even when its not working, Visual Studio\Modules lists the correct Stimulsoft dlls with correct paths and version.

Tried it after seeing in the fusion log viewer that the first search location for the stimulsoft dlls is in the office15 folder.
Lech Kulikowski
Posts: 2575
Joined: Tue Mar 20, 2018 5:34 am

Re: Error Message when in Custom Designer Control Form

Post by Lech Kulikowski » Wed Jun 03, 2020 10:00 am

Hello,


Most probably, you should send your request to sage officeline 8.0 developers. We do not know how they working with our product in that product.

Thank you.
Post Reply