C1FlexReport refrence in ASPNet Core API project

Posted by: grapecity on 6 February 2020, 11:46 am EST

  • Posted 6 February 2020, 11:46 am EST

    I have a ASPNET Core API Project and I need to generate a PDF report on the fly using my C1.Win.C1FlexReport. Everything compilies on the code but when I execute the code, exactly when it tries to load the C1FlexReport I get the following error:

    System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
    File name: 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
       at TestApp.CoreAPI.Reporting.ReportEngine.GenerateCustomReport(C1FlexReport rpt, DataSet data, String reportName, String reportTitle, DateTime reportDate, String sortGroup, String sortField, Boolean saveReport, String[] groups, String[] replaceField, String[] fieldValue, Guid uid)
    

    Maybe Im not referecing the right DLL.

    And because is NetCore and Web Project I can add a reference to WinForms.

    Any clue?

  • Posted 6 February 2020, 5:43 pm EST

    Hello,

    You are directly using the C1.FlexReport in the ASP.Net Core project. Since the C1FlexReport is in .NET Framework, it required to use in the project using .Net Framework dependency.

    To migrate the C1FlexReport into ASP.Net Core is in our roadmap but we could not provide any ETA on this.

    Alternatively, you may create the C1 WebAPI project using .Net Framework for using the FlexReport.

    Here is the demo sample and the documentation link for the same:

    Demo: https://demos.componentone.com/aspnet/webapiexplorer

    Docs: https://www.grapecity.com/componentone/docs/webapi/online-webapi/overview.html

    Hope it will help you!

    PS: Please post any issue related to C1 controls for MVC, MVCCore and WebAPI platforms @ https://www.grapecity.com/forums/mvc-edition

    Regards,

    Manish Gupta

  • Posted 7 February 2020, 3:20 am EST

    Thanks Manish,

    Hope soon all libraries are 100% compatible with netcore so no need of Windows System Forms dependencies are required.

  • Posted 9 February 2020, 5:25 pm EST

    HI,

    Yeah, sure, our team is trying their best. In the meantime, you may use the C1WebAPI report service to show a report in Web Applications. The same reports can be used with C1WebAPI Report Service.

    Regards,

    Manish Gupta

  • Posted 20 June 2020, 8:00 am EST

    Hi, do we have any news about the migration of C1FlexReport for NetCore framework? Thanks

  • Posted 21 June 2020, 8:15 pm EST

    Hi,

    We are sorry for the inconvenience, this is still in our road map and the development team is trying to migrate the report service to .NetCore as soon as possible.

    Regards,

    Manish Gupta

  • Posted 14 October 2021, 8:11 pm EST

    Hello, I am curious if you have an ETA for release of asp.net core support for FlexReports.

    Thanks

  • Posted 17 October 2021, 9:32 pm EST

    Hi Gagik,

    Our development team has planned to add support for the Asp.Net core version for FlexReport WebApi in the 2021v3 release which is expected to be released before or after Christmas week.

    Regards,

    Mainish Gupta

Need extra support?

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

Learn More

Forum Channels