In my opinion, working with DataAdapters and DataSets is more flexible and more accurate.
Anyway, I don't really know your way of doing, but with a proper connectionString it works fine for my needs. Here is an instance:
Code:
string conStr = "Data Source=ServerName;Initial Catalog=DatabaseName;User ID=UserName;Password=UserPassword";
SqlConnection con;
SqlDataAdapter da;
ReportDocument rd;
DataSet ds;
try
{
ds = new DataSet();
con = new SqlConnection(conStr);
rd = new ReportDocument();
string sql = "SELECT * FROM TABLE";
da = new SqlDataAdapter(sql, con);
da.Fill(ds, "DataTableName");
rd.SetDataSource(ds);
}
catch(Exception ex)
{
throw new Exception("Internal error: " +ex.Message);
}
finally
{
rd.Close();
if(ds != null) ds.Dispose();
if(da != null) da.Dispose();
}
This way, it works fine for me. You may also prefer to use the TableLogOnInfo object.
Hope this helps.