Load report failed when implementing crystal report in asp.net 3.5
Im implementing crystal report which is builtin in visual studio 2008. When i create my crystal report and check its preview it shows me the data but when i call it on my abc.aspx page report doesnt load and gives error 'Load report failed'. This is my Code
<CR:Crysta开发者_Python百科lReportViewer ID="CrystalReportViewer1" runat="server"
AutoDataBind="true" ReportSourceID="CrystalReportSource1" />
<br />
<br />
<br />
<br />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="Reports/DailyPaymentStatus.rpt">
</Report>
</CR:CrystalReportSource>
what may be im doing wrong. This report also accept 4 parameters and im not setting them anywhere. Also one thing i want to mention if i make another simple project and do the same thing it runs perfectly and give me the output.
Yes. I found out the answer the problem is with the path
<Report FileName="Reports/DailyPaymentStatus.rpt">
it has to be like
<Report FileName="~/Reports/DailyPaymentStatus.rpt">
You can call show data on report in DataBinding and Navigate methods.
protected void CrystalReportViewer1_DataBinding(object sender, EventArgs e)
{
this.ShowReportData();
}
protected void CrystalReportViewer1_Navigate(object source, CrystalDecisions.Web.NavigateEventArgs e)
{
this.ShowReportData();
}
精彩评论