SectionReport with netcoreapp 3.1 tries to load System.Windows.Forms, Version=4

Posted by: erik.skoglund on 25 November 2020, 1:24 am EST

    • Post Options:
    • Link

    Posted 25 November 2020, 1:24 am EST

    Hello,

    We are in the process of testing AR14 with netcode. Right now trying to move a lot of old AR6 reports.

    Something like this:

    var pageReport = new GrapeCity.ActiveReports.SectionReport();
                    pageReport.LoadLayout(XmlReader.Create(reader), out var errors);
                    pageReport.Run();
    

    works fine when running with .NET Framework, but for netcore it tries to load the System.Windows.Forms assembly, and obviously fails.

    The layout itself does not use anything specific from Forms (including its’ scripts) so I’m wondering if this usage of SectionReport is even supported?

    Thanks!

  • Posted 25 November 2020, 2:57 pm EST

    Hello,

    Can you refer to the “An exception “System.IO.FileNotFoundException’ object” occurs when running a section report in an ASP.NET Core 3.1 project” topic in the following link:

    https://www.grapecity.com/activereportsnet/docs/v14/online/ar-troubleshooting.html

    If problem still exists, then could you please share the type of project and how you are rendering the sectionReport in it.

    Thanks,

    Mohit

  • Posted 25 November 2020, 2:57 pm EST

    Hello,

    Can you refer to the “An exception “System.IO.FileNotFoundException’ object” occurs when running a section report in an ASP.NET Core 3.1 project” topic in the following link:

    https://www.grapecity.com/activereportsnet/docs/v14/online/ar-troubleshooting.html

    If problem still exists, then could you please share the type of project and how you are rendering the sectionReport in it.

    Thanks,

    Mohit

  • Posted 25 November 2020, 8:09 pm EST

    Thanks, ok so it says → Cause: Due to the Windows Forms dependancy of section reports, you need to add more references to the project.

    Does this mean I need to run on windows to use SectionReport? I can’t use dotnet core in a linux docker container for example?

    That fix solved the System.Windows.Forms problem but now I get ```

    An unhandled exception of type ‘System.IO.FileNotFoundException’ occurred in GrapeCity.ActiveReports.dll: ‘Could not load file or assembly ‘System.Data.OleDb, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’. The system cannot find the file specified.’

  • Posted 26 November 2020, 8:49 pm EST

    Hello Erik,

    There are still some issues in getting the SectionReports to run on ASP.NET Core platform and our development team is working hard to get those resolved (in ActiveReports 15). I suggest you to wait for the AR15 to use the SectionReport in Asp.Net core environment.

    Thanks,

    Mohit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels