Last post Jun 23, 2012 01:30 AM by glenf9
Jun 23, 2012 01:30 AM|glenf9|LINK
I have a simple crystal report. I designed it by connecting to my production database so that I would have all of the proper credentials in my report. I have the correct database linked and embedded in the report. I also have my settings in my code as
well. The report works perfect in running it through Visual Studio. I've deployed it and set it to run under the local IIS on my computer and it runs fine (still pointing to the production database). When I move it to my production server, it prompts for
database name and will not work. What am I missing? I installed the Crystal Reports Redistributable for VS 2010 on the production server. I've read some things about needing to build in merge components, but don't really know anything about that. Visual
Stuid 2010 & Crystal Reports 13
Here is the code to my report.
ReportDocument curReport = new ReportDocument();
ParameterDiscreteValue parameter = new ParameterDiscreteValue();
parameter.Value = applicationID;
ParameterField paramField = new ParameterField();
paramField.Name = "@ApplicationID";
paramField.HasCurrentValue = true;
curReport.SetDatabaseLogon("DBUSER", "DBPASSWORD", "DBSERVER", "DB");
rptViewer.ReportSource = curReport;
I figured out what was going on here. I used the SQL Native Client as my connection type. The production server did not have that enabled. I tested changing it to a standard OLE DB SQL connection instead and it worked.