• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 778
  • Last Modified:

asp.net crystal report problem


I have developed one web application using asp.net(C#), sql server 2008, crystal report with framework support of 3.5.

on my development machine, i am using windows authentication for connectivity with sql server. on client server it is sqlserver authentication which requires username and password.

I have designed and crystal report and it works fine on my development machine.

Now i am uploading that application on my client's web server. I am publishing  application then uploading the same on clients server.

As soon as i try to access the report from clients server i am getting following error

Failed to open the connection. Details: [Database Vendor Code: 17 ] Failed to open the connection. temp_319fee1a-1b9d-4cc7-b8ac-8ca714225296 {FB8D324C-CE32-48E3-A79C-60EC8EDC716F}.rpt Details: [Database Vendor Code: 17 ]

how to resolve this error
  • 2
1 Solution
where do you set connection string for crystal report? The exception you get is expected as you use Win authentication and it works fine on your machine but on client server you have to provide username and password in connection string. So please, write me where do you set connection string for your crystal report?
I guess you have your connection string in app.config, so you can use this approach - code it just before you actually open the report:

ReportDocument yourReport = this.CrystalReportSource1.ReportDocument;
 yourReport.DataSourceConnections[0].LogonProperties.Set("Connection String",
 CrystalDecisions.Shared.NameValuePairs2 yourLogon = new CrystalDecisions.Shared.NameValuePairs2();
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now