Pre-compiled reports don't run after upgrade

Stimulsoft Reports.WEB discussion
Post Reply
Ryan Robar
Posts: 22
Joined: Fri Sep 20, 2019 3:46 pm
Location: Canada

Pre-compiled reports don't run after upgrade

Post by Ryan Robar »

Hello,

I'm trying to upgrade to Stimulsoft.Reports.Web.NetCore 2023.2.4, but when I try to load a pre-compiled report it fails with the following error:

Code: Select all

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.MissingMethodException: Method not found: 'Void Stimulsoft.Report.Components.StiText.set_Font(System.Drawing.Font)'.
   at Reports.Report.InitializeComponent()
   at Reports.Report..ctor()
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
   --- End of inner exception stack trace ---
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
   at Stimulsoft.Base.StiActivator.CreateObject(Type type)
   at Stimulsoft.Report.StiReport.GetReportsFromAssembly(Assembly assembly)
   at Stimulsoft.Report.StiReport.GetReportFromAssembly(Stream assemblyStream)
   at Stimulsoft.Report.StiReport.GetReportFromAssembly(String assemblyFile, Boolean lockFile)
   at Stimulsoft.Report.StiReport.GetReportFromAssembly(String assemblyFile)
This happens on load, before any data has been passed to the report or I've tried to render it.
I've attached a simple example project that should reproduce the issue. A simple report along with it's compiled dll are in the bin folder. This is the line that's throwing the exception:

Code: Select all

var report = StiReport.GetReportFromAssembly(Path.Combine(Environment.CurrentDirectory, "Report.dll"));
Let me know if there's anything else you need.

Thanks,

Ryan
Attachments
CompiledReportTest.zip
(7.19 KiB) Downloaded 57 times
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Pre-compiled reports don't run after upgrade

Post by Max Shamanov »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Pre-compiled reports don't run after upgrade

Post by Max Shamanov »

Hello,

If you load the report in NET Core, you need to compile the report in NET Core.
If the report was saved in Designer.exe, it was compiled under .NET Framework 4.7.2.

Thank you.
Ryan Robar
Posts: 22
Joined: Fri Sep 20, 2019 3:46 pm
Location: Canada

Re: Pre-compiled reports don't run after upgrade

Post by Ryan Robar »

Hello,

Is there any plan to add the ability to compile into a .NET compatible report from the designer? Or will it always only compile to .NET Framework?

Thanks,

Ryan
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Pre-compiled reports don't run after upgrade

Post by Max Shamanov »

Hello,

Unfortunately, we don't have plans to add compilation into a .NET compatible report from the designer.

Thank you.
Post Reply