Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 30, 2011 09:35 AM by necro_mancer
Nov 03, 2009 09:31 AM|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 11:20 PM|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 08:11 AM|LINK
Refer the following link .
Check the Report name and check is it getting connection properties.
Nov 30, 2011 09:35 AM|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