Report loading error while implementing Crystal report in asp.net 3.5

Im implements a crystal report, which is built into visual studio 2008. When I create my crystal report and check its preview, it shows me the data, but when I find it in my report on the abc.aspx page, it does not load and does not give error 'Could not load report'. This is my code

<CR:CrystalReportViewer 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 could they do wrong. This report also accepts 4 parameters, and im don't set them anywhere. Also one thing that I want to mention if I am doing another simple project and doing the same thing, that it works great and gives me the result.

0
source share
2 answers

Yes. I found out that the problem is related to the path

 <Report FileName="Reports/DailyPaymentStatus.rpt"> 

he should be like

 <Report FileName="~/Reports/DailyPaymentStatus.rpt"> 
+1
source

You can cause data to appear in the report in the 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(); } 
+1
source

Source: https://habr.com/ru/post/893912/


All Articles