Skip to Content
Former Member
Nov 14, 2008 at 03:08 PM

Using push AND pull methods to get data



I would think that there is an answer to my question in the forum, but I could not find it... also, please be patient, I am not a cr expert!

We are developing reports using cr2008 editor and connecting to a local sqlserver database.

The report consists of several tables from the db, a calls table and a couple more tables.

Then, in our app (VS2005, c#) I use the push method to get data to the Calls table to have the report display the relevant data (no way around that):

m_dataSet = new DataSet();                
m_oleAdapter = new OleDbDataAdapter();                
m_oleAdapter.SelectCommand = new OleDbCommand(selectString, m_oleConn);
m_oleAdapter.Fill(m_dataSet, "Calls");

What I would like to do with the other tables is not use the push method to avoid as much overhead as possible, just change the db connection info since I want the report to pretty much have access to all the records in the table.

I tried numerous things:

1- changing all the available data sources:

m_reportDocument.DataSourceConnections<i>.SetConnection(server, database, username, password);

2- changing the connection info at the table level:

IEnumerator er = m_reportDocument.Database.Tables.GetEnumerator();
while (er.MoveNext())
        Table tb = (Table)er.Current;
        if (tb.Name != "Calls")
                        TableLogOnInfo tableLogonInfo = tb.LogOnInfo;
                        tableLogonInfo.ConnectionInfo = connectionInfo;

Does not work, the tables act as if they are empty...

To make it work now, I need to create a dataset for each additional table and I hope to find a way around since my dataset is a 'select * from tableName'

Now, as soon as I don't pass the dataset to my calls table, the other tables work and conenct to the right db. Almost looks like if the push and pull are exclusive.

So, I am wondering if I can use the push method (see above) for my Calls table and just change the connection info for the other tables? Hope it makes sense, and if you need any more info, please let me know.

Any help much appreciated.