Posted on 2014-01-16
I am us vs2010 and I am trying to build a report viewer. The initial generation of the page at load when opening the report viewer works fine. Brings up the data needed correctly in every way. I am trying to get the report to change based on a parameter change selection in a dropdown box on the page. I get a message saying 'A data source instance has not been supplied for the data source 'DataSet1'.
Below is the code. I have tried to embed the data source, but obviously it is not working.
DataSet - ManualDataSet.xsd
Report - ManDataReport.rdlc
ReportViewer - ManualDataReport.aspx
Can anyone help?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
DropDownList5.SelectedValue = "NC0117"
Protected Sub DropDownList5_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DropDownList5.SelectedIndexChanged
Dim DieNumberParam(0) As Microsoft.Reporting.WebForms.ReportParameter
DieNumberParam(0) = New Microsoft.Reporting.WebForms.ReportParameter("DieNumberParameter", DropDownList5.SelectedValue.ToString)
ReportViewer1.LocalReport.ReportEmbeddedResource = "ManuaDataSet.xsd/ManDataReport.rdlc"
ReportViewer1.LocalReport.ReportPath = "ManDataReport.rdlc"