Build the Custom store in .net Framework 4.7.2

Posted by: xuan.nguyen on 24 July 2024, 11:10 pm EST

    • Post Options:
    • Link

    Posted 24 July 2024, 11:10 pm EST - Updated 24 July 2024, 11:19 pm EST

    Hi all,

    I using AR v18 with .Net framework 4.7.2.

    I want to save the report to database (by byte datatype) and load report from database (I don’t need physical files).

    I just follow that:

    https://developer.mescius.com/activereportsnet/docs/latest/online/use-shared-data-sources-in-web-designer.html

    and the sample:

    https://github.com/activereports/WebSamples18/tree/main/WebDesigner_CustomStore

    I write this code in startup.cs:

    public void Configuration(IAppBuilder app, IReportStore reportStore, IResourceRepositoryProvider resourceProvider)
    {
        app.UseReportViewer(config =>
        {
          
            config.Prefix = "/activereport";
        });
    
        app.UseReportDesigner(config =>
        {
      
            config.UseReportsProvider(reportStore);
            config.UseResourcesProvider(resourceProvider);
            config.Prefix = "/activereport";
            config.OmitViewerConfiguration = true;
        });
    }

    But seem it’s not working with .net framework.

    Got error after run:

    How can I fix that?

  • Posted 26 July 2024, 3:15 am EST

    Hi Xuan,

    It would be difficult to comment on the issue without actually looking into a sample replicating the issue. Could you please try providing us with a stripped-down and runnable sample replicating the issue so that we can investigate the same at our end and get back to you accordingly?

  • Posted 28 July 2024, 9:37 pm EST

    Hi Katyayny,

    Thanks for your response. Here my sample replicating:

    https://drive.google.com/file/d/1H2aaCy6SS6r3FUU1jjct7Lv5XKjMfFUk/view?usp=sharing

    Please check.

  • Posted 29 July 2024, 2:10 am EST

    Hi Xuan,

    Thank you for the attached sample. The Configuration method in the Startup class has a signature of

    void Configuration(IAppBuilder app, IReportStore reportStore, IResourceRepositoryProvider resourceProvider)
    instead of the expected
    void Configuration(IAppBuilder)
    . This mismatch caused the OWIN framework to be unable to recognize the method as a valid startup method. You need to modify the Configuration method to match the expected signature and move the initialization of reportStore and resourceProvider into the method itself. Please refer to the attached updated sample for reference.

    We hope this helps!

    https://drive.mescius.io/download/temporary-share/e1e54ef0-3ccf-4a4b-ba50-0ae25515bea9

  • Posted 29 July 2024, 4:08 am EST

    Hi Katyayny,

    That’s helpful. Thank you very much.

Need extra support?

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

Learn More

Forum Channels