Page 1 of 1

Reports fails when SQL database connection string is wrong

Posted: Mon Jul 10, 2006 7:59 am
by bergamot
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?

Reports fails when SQL database connection string is wrong

Posted: Mon Jul 10, 2006 8:32 am
by Vital
I don't see in your code calling of RegData method, but error message contain [RegData].
You provide all code? May be RegData exists in scripts of report?

Please send your report to Image for examination.

Thank you.