FillColumns taking a long time
Posted: Mon Mar 07, 2011 10:51 pm
I am adding databases connections and datasources dynamically. I am adding a datasource using
StiSqlSource sti_src = new StiSqlSource(pDatabaseName, "MY_TABLE", "MY_TABLE", "select * from MY_TABLE;", true);
pReport.Dictionary.DataSources.Add(sti_src);
pReport.Dictionary.Synchronize();
sti_src.FillColumns();
... the sti_src.FillColumns takes 30 seconds if the MY_TABLE has a lot of rows. This takes this long even if MY_TABLE is not actually used in the report. Why does this take so long? Is this the correct way to dynamically add a SQL Server table to a report. Is there a faster way that does not actually get all the rows unless they are needed to run the report?
thx
StiSqlSource sti_src = new StiSqlSource(pDatabaseName, "MY_TABLE", "MY_TABLE", "select * from MY_TABLE;", true);
pReport.Dictionary.DataSources.Add(sti_src);
pReport.Dictionary.Synchronize();
sti_src.FillColumns();
... the sti_src.FillColumns takes 30 seconds if the MY_TABLE has a lot of rows. This takes this long even if MY_TABLE is not actually used in the report. Why does this take so long? Is this the correct way to dynamically add a SQL Server table to a report. Is there a faster way that does not actually get all the rows unless they are needed to run the report?
thx