try abc

try abc

  • 1.4k
  • 306
  • 488.2k

Problem Changing connectionInfo of Crystal report at runtime..

Dec 19 2008 7:30 AM
        Hello All,
                I have created a crystal report using IDataReader... for that I have created one Dll file which has some static method and return a IDatareader..
So that I connect this Dll to create a new crystal report..  for this i refrence the following link.. http://msdn.microsoft.com/en-us/library/ms227598.aspx

Now at run time I want to change the Login Info Like server, UserName and Password.. I already try "TableLogOnInfo"  to logon and apply login to each table using loop, but it did n't work and Display the data of same server database.. not the one i mentioned in ConnectionInfo...

Then I try  "DataSourceConnections"

 DataSourceConnections dataSourceConnections = crAllAsset.DataSourceConnections;
            IConnectionInfo connectInfo = dataSourceConnections[0];
            connectInfo.SetConnection(@"MICROSOFT\SQLEXPRESS", "dbW","sa", "sa1234");

still it shows the same data,,
can anybody tell me what going wrong here???

Answers (3)