I\'m trying out SSRS for the first time with an ASP.Net web form.
I created a local RDLC report and used a ReportViewer in the \"Default\" web form. Under the smart
This happens when you deploy in live site and report's .rdlc
file is not yet published in the site, so here is the solution which worked form me:
Screen Shot:
Reference:
This and This
Hope that helps.
Okay, so it looks like you are missing your ReportPath in your local report. Here is a code example straight from my working project.
<body class="center">
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:Label ID="lblCheckDate" runat="server" Visible="False"></asp:Label>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Height="800px" Width="620px" CssClass="center" BackColor="White" ShowBackButton="False" ShowPageNavigationControls="False">
<LocalReport ReportPath="Paystub.rdlc" ReportEmbeddedResource="PayrollApplication.Paystub.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="SqlDataSource1" Name="DataSet1" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:pay %>"
SelectCommand="SELECT * FROM [ViewPaychecks] WHERE ([CHKDATE] = @CHKDATE)">
<SelectParameters>
<asp:ControlParameter ControlID="lblCheckDate" Name="CHKDATE" PropertyName="Text" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</form>
</body>
Let me know if this helped! I used an SqlDataSource but this should work with the ObjectDataSource as well.
I had a the same error message and resolved it by adding the following two (2) lines at the end of the report definition:
ReportViewer1.LocalReport.Refresh()
ReportViewer1.RefreshReport()