Last post Nov 30, 2011 05:35 AM by necro_mancer
Nov 03, 2009 05:31 AM|mkosucu|LINK
I am trying to view my report files on CrystalReport viewer in ASP.NET programmatically. by using the code blow;
CrystalReportSource reportsource = new CrystalReportSource();
CrystalDecisions.Web.Report report = new CrystalDecisions.Web.Report();
Guid reportid = new Guid(Request.QueryString["GUID"]);
string path = Server.MapPath("/Reports/") + dc.Reports.Where(k => k.OID == reportid).First().FileContent;
report.FileName = path;
reportsource.Report = report;
CrystalReportViewer1.ReportSource = reportsource;
No valid report source is available
Nov 29, 2011 07:20 PM|dabhi_mayur|LINK
I think you need to rebind report again.
Write your code in page_load event and try.
protected void Page_Load(object sender, EventArgs e)
// attached our report to viewer and set database login.
ReportDocument report = new ReportDocument();
//report.SetDatabaseLogon("username", "pwd", @"server", "database");
rptviewer.ReportSource = report;
Nov 30, 2011 04:11 AM|Sagar Kamate|LINK
Refer the following link .
Check the Report name and check is it getting connection properties.
Nov 30, 2011 05:35 AM|necro_mancer|LINK
In addition to the previous response, there are several requirements to run Crystal Report:
1. Please make sure the CR version installed on the server matches the one you use on your application/website
2. Please make sure that the assemblies of the CR installed on the server are referenced correctly on your web.config
3. Please make sure you set the application pool of your application to operate under LOCAL SERVICE permission
4. Please make sure FULL TRUST mode is enabled on your operating folder
5. Please make sure crystalreportviewer and aspnet_client folders are copied to your operating folder.
Should you still have problems, you can consider hosting it with asphostcentral.com.
Please mark this response as an "answer" if it helps you. Thanks heaps