Skip to Content
0
Oct 20, 2020 at 10:56 AM

CrystalDecisions.CrystalReports.Engine.LogOnException: "Database logon failed."

2432 Views

Hi, I have a problem with loggin, it works for previous build version of my program now it throws error, maybe there was a windows update that could affect it but it is only a suppose, anyway I cannot fix it.

Same code executes for previous build: user,pass, server, database are the same as in previous build.

my code:

using (ReportDocument rp = new ReportDocument())

{

rp.Load(newFilerptpath);

rp.SetDatabaseLogon("mssqluser", "pass", "mssqlserver", "database");

rp.Refresh();

//...parameter set

rp.ExportToDisk(exportFormatType, outputfile);//here throws error

//CrystalDecisions.CrystalReports.Engine.LogOnException: "Database logon failed."

}