I see the topic isn't new, but I searched many sites, found many clues, but nothing worked for me:(
I am using Crystal Reports Viewer control in my ASP.NET application. Report is quite simple, there are two parameters which I have to pass. I have two CrystalReportsSource and one CrystalReportsViewer controls on my site. When the page loads I run this snippet:
CrystalReportSource1.ReportDocument.SetParameterValue("name", Session["name"].ToString());
CrystalReportSource1.ReportDocument.SetParameterValue("code", Session["code"].ToString());
CrystalReportViewer1.ReportSource = CrystalReportSource1;
Setting source is needed, because I have two kinds of report and depending on some other session parameter I change which report should I print on screen (and which report source should I bind).
Unfortunately, this code doesn't work for me. CRViewer shows me little prompt/box saying that ~"Logging into database failed" (its only my translation, cause this is in my locale). I have no idea how to make it works. Nor my DB (Access), nor reports need credential to login (other words - I don't have to put them in any place).
Any help would be appreciated.