Hello everybody, this forum is my last hope
I couldn't get any answers from any C# forums. Here is the problem. I'm writing COM in C#. This COM has to print/preview EXISTING !!!!! Crystal Report. Repeat, I don't have to create reports, just show/print them. Here is the code:
ReportClass myReport = new ReportClass();
myReport.FileName = “C:\…some path to the report file”;
myReport.SetDatabaseLogon(“userid”, “password”, “server”, “database”);
myReport.PrintOptions.PrinterName = “some printer”;
m_ myReport.PrintToPrinter(1, false, 0, 0);
Some problem appears in SetDatabaseLogon(...) function. It returns error:
“Unable to connect: incorrect log on parameters”, which is absolutely wrong message, because all parameters are OK. For debugging purpose I just hard coded “userid”, “password”, “server”, “database” while using SetDatabaseLogon function. And without any problem using these parameters I could login to Query Analizer or Management studio, also I could open the report and create new connection using these “userid”, “password”, “server”…
Does anybody has any idea what am I missing? What am I doing wrong?
Microsoft, Crystal Report guru, where are you?
Rulex