Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I am working on a application, which includes some reports.
The main problem is that my reports work perfectly on my local computer, but when I try to run those reports on client server architecture the following error comes up and application stop working.
The error is:
failed to open the connection.
details. [database vendor code : 17 ]
failed to open the connection.
temp_2353434p-45325-74453-657453 
{}.rpt
details. [database vendor code : 17 ]

I just would like to know how I can fix this error or how I should change the connection string so that it will automatically connect with database and fill the report with data.

I use the following code for getting data form table
C#
RptQuizResult cryRpt = new RptQuizResult();

          ParameterFieldDefinitions crParameterFieldDefinitions;
          ParameterFieldDefinition crParameterFieldDefinition;
          ParameterValues crParameterValues = new ParameterValues();
          ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();

          crParameterDiscreteValue.Value = textBox1.Text;
          crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields;
          crParameterFieldDefinition = crParameterFieldDefinitions["QuizID"];
          crParameterValues = crParameterFieldDefinition.CurrentValues;

          crParameterValues.Clear();
          crParameterValues.Add(crParameterDiscreteValue);
          crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);

          crystalReportViewer1.ReportSource = cryRpt;
          crystalReportViewer1.Refresh();

Thanks in advance
Posted
Updated 12-Oct-13 8:45am
v4

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900