I develop reports against SQL database (sql express). I use OLDB provider for SQL, (here is the connection string, "Provider=SQLOLEDB.1;Password=xyz;Persist Security Info=True;User ID=sa;Initial Catalog=Database1;Data Source=SERVER1") to design the reports but at run time, it may be required to produce reports against oracle datbase (it has the same schemas as that of SQL db).
Here is the code I use to do this, but I always get a blank report (no error and no data)...
Code: Select all
string name = stiReport1.Dictionary.Databases [0].Name;
stiReport1.Dictionary.Databases.Clear();
string connectionString = "Provider=OraOLEDB.Oracle.1;Data Source=ORCL_DEVORCL;Password=xyz;User ID=USER1";
stiReport1.Dictionary.Databases.Add(new StiOleDbDatabase(name,connectionString));
stiReport1.Dictionary.Synchronize();
Thanks!!!