System.Data.DataSet custom provider

Posted by: leonard on 3 August 2023, 4:07 pm EST

    • Post Options:
    • Link

    Posted 3 August 2023, 4:07 pm EST

    I’m looking to migrate our existing reports set up to grape city reports.

    Our existing set up queries data and produces a System.Data.DataSet with the data already present. Converting this to a method that generates a query object with connection string, parameters, etc is not really a viable option due to the number of reports.

    I can see in documentation that it might be possible to create a DataLayer or something, but I can’t find the samples to cobble it together. The application is currently a ASP.NET MVC application but not MVC Core, yet.

    Right now I’m getting an Specified data provider was not found: System.Data.DataSet. exception while trying to dummy it up.

  • Posted 3 August 2023, 8:37 pm EST

    Hey Leonard,

    I’m looking to migrate our existing reports set up to grape city reports.

    Please share which reports currently do you have and which reports in Grapecity are you referring to.

    Right now I’m getting an Specified data provider was not found: System.Data.DataSet. exception while trying to dummy it up.

    Are you using the Asp.Net Core or Asp.Net Mvc.

    In case you would like to use the DataSet in the Asp.Net Core MVC, please refer to the following blog:

    https://medium.com/@sagorcse09/uses-of-dataset-in-net-core-789e5234d0f3

    For information, System.Data is available for NET Core 7.0.

    https://learn.microsoft.com/en-us/dotnet/api/system.data.dataset?view=net-7.0

    Hope it helps!

    Regards,

    Manish Gupta

  • Posted 7 August 2023, 10:48 am EST - Updated 7 August 2023, 11:18 am EST

    The application is currently a ASP.NET MVC application in framework 4.8.

    ETA: The existing reports are SSRS format reports, we’re trying to change them to .rdlx grape city reports.

  • Posted 7 August 2023, 11:42 pm EST

    Hi Leonard,

    If you are using the ComponentOne FlexViewer, you need not to convert the SSRS reports. You may directly consume them using the C1 WebApi Report Service.

    Please refer to the demo sample:

    https://www.grapecity.com/componentone/demos/aspnet/FlexViewerExplorer

    Please let us know if you are using ComponentOne or ActiveReports.

    https://www.grapecity.com/activereportsnet

    Regards,

    Manish Gupta

  • Posted 8 August 2023, 11:16 am EST

    We’re using Active Reports, because we only have .NET Framework currently and are hoping to change the reports to a format that is compatible with .NET 6+.

  • Posted 8 August 2023, 8:06 pm EST

    Hi Len,

    I am Anand from the ActiveReports customer support team.

    As you are using SSRS reports to convert them to ‘.rdlx’ reports you can use the ActiveReports Import tool located at C:\Program Files (x86)\GrapeCity\ActiveReports 17\Tools\GrapeCity.ActiveReports.Imports.Win.exe and import all the ‘.rdl’ SSRS reports that you want to convert to ‘.rdlx’ ActiveReports format.

    To learn more about importing your MS SSRS RDL report please refer to: ActiveReports 17 - MS SSRS RDL.

    Now to use the ‘System.Data.DataSet’ as the data source for your ‘.rdlx’ reports you can add a DataSource in your report and set its provider as ‘DataSet provider’, create a new report DataSet of this DataSource and add all the Fields contained in your DataTable to this DataSet. These fields can be used to display data in your report.

    To assign your ‘System.Data.DataSet’ to the report, load your ‘.rdlx’ report into a ‘PageReport’ object and use its ‘PageReport.Document.LocateDataSource’ event.

    In the handler assign your DataTable to the ‘args.Data’ property.

    To learn more about binding your ‘System.Data.DataSet’ to the Page/RDL (.rdlx) report you may refer to Bind Dataset to Page/RDL Reports at Run Time

    Please find attached a sample implementing the same in ASP.NET Core.

    For any further queries related to ActiveReports please create a new case on ActiveReports - Forums so that our ActiveReports team can assist you further regarding the same.

    Regards,

    Anand

    JSViewer_MVC_Core.zip

  • Posted 9 August 2023, 4:27 pm EST - Updated 9 August 2023, 4:32 pm EST

    I am doing this.

    If I set Args to a DataTable that’s I get `Specified data provider was not found: System.Data.DataSet.

    
    protected void Page_Load(object sender, EventArgs e)
    {
    if(!IsPostBack){
    //get the reportFile stream
    
    StreamReader reader = new StreamReader(reportFile);
    report = new PageReport(reader);
    
    //Load data and other stuff
    report.Document..LocateDataSource += LocateDataSourceRuntime;
    
    WebViewer1.ViewerType = ViewerType.HtmlViewer;
    WebViewer1.Report = report;
    }
    }
    
    private void LocateDataSourceRuntime(object sender, LocateDataSourceEventArgs args)
    {
    	args.Data = _DataSet.Tables[0];
    }
  • Posted 10 August 2023, 4:45 pm EST

    Hi Leo,

    We tried to replicate the issue on our end in a fresh sample using WebViewer along with your attached code. However, the issue does not seem to replicate on our end.

    We have attached our sample for the same.

    It seems like the issue is specific to your sample. To further investigate the same could you please create a new case on ActiveReports - Forums and share your sample replicating the issue or modify our attached sample such that it replicates the issue?

    Regards,

    Anand

    SampleWebViewer.zip

  • Posted 16 August 2023, 3:10 pm EST

    This replicates the issue.

    SampleWebViewer.zip

  • Posted 16 August 2023, 11:27 pm EST

    Hi Leonard,

    Thank you for the sample! We were able to replicate the issue in your sample. We could observe that in your report’s DataSource no Provider was selected which is why it was throwing the error you are getting.

    Upon setting the DataSource’s provider to ‘DataSet Provider’ and clearing the DataSet’s Query/Command Text running the project runs as expected and renders the report in the viewer.

    Please find attached the updated sample for the same.

    Regards,

    Anand

    SampleWebViewer.zip

  • Posted 21 August 2023, 6:10 pm EST

    I can’t replicate it in the sample project but after making those changes I get a Document processing error. Where would i go about finding what might be causing that?

  • Posted 22 August 2023, 5:19 pm EST

    Hi Leo,

    We’re glad your original issue has been resolved.

    The ‘Document processing error’ can be thrown due to various reasons due to issue(s) in your report design.

    In order to further help you debug the cause of your issue please create a new issue on ActiveReports - Forums along with a sample replicating the issue so we could replicate the same on our end and further investigate this issue.

    Thanks,

    Anand

Need extra support?

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

Learn More

Forum Channels