Click here to Skip to main content
16,018,417 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
MY CODE:-
ReportDocument rpt = new ReportDocument(); rpt.Load(System.Web.HttpContext.Current.Server.MapPath("~/EMPLOYEE.rpt"));
rpt.SetDatabaseLogon("SA", "XXXXXXX", "192.168.0.1", "DB");
rpt.ExportToDisk(ExportFormatType.PortableDocFormat,FILEPATH);

ERROR:-
Logon failed. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for SQL Server Description: Login failed for user 'SA'. SQL State: 42000
Posted

1 solution

Probably you have passed invalid login details, make sure the login details is correct. Connect SQL server using the same login details to verify this.

And check this one for your reference.
C# Crystal Reports Dynamic Logon parameters[^]
 
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