Reports fails when SQL database connection string is wrong
Posted: Mon Jul 10, 2006 7:59 am
I encapsulate al queries inside report. Queries are designed using test machine. And work fine.
On a client network I substitute connectonstring at runtime:
StiReport report = new StiReport();
report.Load(template);
report.Dictionary.Databases.Clear();
StiSqlDatabase sqldb =new StiSqlDatabase("roadreports", connectionString);
report.Dictionary.Databases.Add(sqldb);
report.Compile();
report[paramName] = Param;
report.Render(true);
report.Show();
The report is not opened. Error message [RegData] Object is not set to a reference
Now the question: WHY isn't it working?
On a client network I substitute connectonstring at runtime:
StiReport report = new StiReport();
report.Load(template);
report.Dictionary.Databases.Clear();
StiSqlDatabase sqldb =new StiSqlDatabase("roadreports", connectionString);
report.Dictionary.Databases.Add(sqldb);
report.Compile();
report[paramName] = Param;
report.Render(true);
report.Show();
The report is not opened. Error message [RegData] Object is not set to a reference
Now the question: WHY isn't it working?