Hi All.
I.m a new developer (i´m student), I´m trying to generate a reportviewer passing parameters, I followed some tutorials of this site however does not work, always appears the following error.
"None provided any instance of data source for the origin of 'r_instructores' data."
in spanish appears "No se ha proporcionado ninguna instancia de origen de datos para el origen de datos 'r_instructores'.", this is my code.
ASPX Page
---------------------------
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt">
<LocalReport ReportPath="reportes\Report1.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="ARTES_OFICIOSDataSet" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetData"
TypeName="SIAO.reportes.DS_insTableAdapters.instructorTableAdapter">
</asp:ObjectDataSource>
----------------------------
C#.cs Code
----------------------------
protected void Page_Load(object sender, EventArgs e)
{
ReportParameter p1 = new ReportParameter("idinstructor", txtID.Text);
ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { p1 });
ReportViewer1.Visible = true;
ReportViewer1.DataBind();
ReportViewer1.LocalReport.Refresh();
}
protected void btnGenerar_Click(object sender, EventArgs e)
{
ReportParameter p1 = new ReportParameter("idinstructor", txtID.Text);
ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { p1 });
ReportViewer1.Visible = true;
ReportViewer1.DataBind();
ReportViewer1.LocalReport.Refresh();
}
-------------------------
Thanks in advance for your help!