A data source instance has not been supplied for the data source“Product_Detail” in Microsoft reporting service

后端 未结 10 1338
孤独总比滥情好
孤独总比滥情好 2021-02-07 03:19

I`m trying to display record in a Report. Data is in the Dataset. but it is not binind to them. When forms load it shows it report layout. But when i click on the button it show

相关标签:
10条回答
  • 2021-02-07 03:58

    I bumped into this problem while using version 10 of the ReportViewer while using Visual Studio.Net 2012 to edit code.

    I found a solution by taking the name of the Data Source in the error message (in the case above, it's "Product_Detail"). I then went into source code view, found the ReportViewer, its DataSources, and then inside its ReportDataSource.

    I set the Name property of the ReportDataSource to the same as the Data Source mentioned in the error message (ie "Product_Detail").

    I hope this works for you as it did for me.

    Also, if you have the latitude to use a later version of the ReportViewer control, you may find that this problem either doesn't appear or is easier to solve.

    0 讨论(0)
  • 2021-02-07 04:07

    I know this post bit old but I would like to share my solution with you guys so it might help some.

    In my project I got the same error which is "a data source instance has not been supplied for the datasource 'dataset1'". And I used entity framework with code-first method in my project.

    In order to solve above error I follow below steps.

    1. Select action arrow on report designer (Report viewer).
    2. And select the RDLC report from choose report dropdown list.
    3. Select "Choose Data Source"Choose Data Source
    4. Then select the data source you wantSelect datasource / binding source from the drop down in highlighted area
    0 讨论(0)
  • 2021-02-07 04:09

    I ran into this in VS2013 in my c# app.. so in case others get here..If you added the dataset in the report designer.. Go to your form, in the designer, click the action arrow on the reportviewer control. Select Rebind Data Sources.

    0 讨论(0)
  • 2021-02-07 04:15

    With respecting to the existing answers, I came across this issue today in VS2015 Professional and fixed it by navigating to Form1.cs (Design), using the action arrow selected the correct datasource and rebind in the end. Please see the image below and follow red, green and purple indications accordingly to see my solution steps.

    0 讨论(0)
提交回复
热议问题