I am using pull model in crystal reports.For simplicity I
m using only one table in SQL Server. I have tried
following code to change my database:
ConnectionInfo ci = new ConnectionInfo( );
ci.ServerName = Changed_SERVER_ NAME;
ci.DatabaseName = Changed_DATABAS E_NAME;
ci.UserID = Changed_DATABAS E_USER_NAME;
ci.Password = Changed_DATABAS E_PASSWORD;
TableLogOnInfo li = new TableLogOnInfo( );
li.ConnectionIn fo = ci;
li.TableName = ChangedTableNam eButSameStructu re;
MyRep.Database. Tables[i].ApplyLogOnInfo (li);
crViewer.Report Source = MyRep;
But when i view the report using crystal report viewer
control it shows me records of that table to which it was
connected to, when the report was designed.
Can anyone provide me help on this issue? Or tell me any
other way to change logon information, database and tables
at run time(in pull model)?
Thanx
munish
m using only one table in SQL Server. I have tried
following code to change my database:
ConnectionInfo ci = new ConnectionInfo( );
ci.ServerName = Changed_SERVER_ NAME;
ci.DatabaseName = Changed_DATABAS E_NAME;
ci.UserID = Changed_DATABAS E_USER_NAME;
ci.Password = Changed_DATABAS E_PASSWORD;
TableLogOnInfo li = new TableLogOnInfo( );
li.ConnectionIn fo = ci;
li.TableName = ChangedTableNam eButSameStructu re;
MyRep.Database. Tables[i].ApplyLogOnInfo (li);
crViewer.Report Source = MyRep;
But when i view the report using crystal report viewer
control it shows me records of that table to which it was
connected to, when the report was designed.
Can anyone provide me help on this issue? Or tell me any
other way to change logon information, database and tables
at run time(in pull model)?
Thanx
munish
Comment