I have a report that works fine in the designer (ver 14.1.1.1036) using a store procedure from a Sybase/SAP ASE database.
When I try to use it from a C# windows forms application TestConnectivity() always fails.
This fails:
Rpt = new ReportDocument();
Rpt.Load(report_file);
Rpt.SetDatabaseLogon("dbxx", "password", "LBCTEST", "test3" );
foreach(Table table in Rpt.Database.Tables)
{
if(!table.TestConnectivity())
throw new Exception("TestConnectivity() failed!");
}
And this fails:
Rpt = new ReportDocument();
Rpt.Load(report_file);
foreach(Table table in Rpt.Database.Tables)
{
TableLogOnInfo tableLogOnInfo = table.LogOnInfo;
ConnectionInfo connInfo = tableLogOnInfo.ConnectionInfo;
connInfo.ServerName = "LBCTEST";
connInfo.DatabaseName = "test3";
connInfo.UserID = "dbxx";
connInfo.Password = "password";
tableLogOnInfo.ConnectionInfo = connInfo;
table.ApplyLogOnInfo(tableLogOnInfo);
if(!table.TestConnectivity())
throw new Exception("TestConnectivity() failed!");
}
What am I doing wrong? Where do I go from here?
Thanks,
John