locked
MVC RDLC and Stored Procedure Dataset - The report data source object must be of the type System.Data.DataTable RRS feed

  • Question

  • User-164452226 posted

    Good day,

    l have created an rdlc report that extracts data using a dataset linked to a stored procedure in VS and ASP.Net 2017 MVC app. When l run the report, l get the following error:

    System.ArgumentException: 'The report data source object must be of the type System.Data.DataTable, System.Collections.IEnumerable, or System.Web.UI.IDataSource.'

    May you kindly assist me

    Saturday, January 26, 2019 10:04 AM

Answers

All replies

  • User-1176676965 posted

    I am facing the same issue and received error as below:

    "The report data source object must be of the type System.Data.DataTable, System.Collections.IEnumerable, or System.Web.UI.IDataSource". The stack trace I noticed as ""Microsoft.ReportViewer.WebForms" at Microsoft.Reporting.WebForms.ReportDataSource.set_Value(Object value) at Microsoft.Reporting.WebForms.ReportDataSource".

    Researched to resolve the issue and there is no reference that I could find to resolve it. I am using MVC  and VS 2017.  Calling DB procedure linked to the data source. Any help will be greatly appreciated.

    Saturday, January 26, 2019 4:07 PM
  • User409696431 posted

    Are you populating a DataTable and using that as the report source?

    https://www.aspsnippets.com/Articles/Create-RDLC-Report-using-Stored-Procedure-in-ASPNet-with-C-and-VBNet.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 27, 2019 1:12 AM