Hi Archit,
I suggest you to provide connection string , query and report parameters at runtime for your report.
--
Thanks
Hello Archit,
You can use
CrystalDecisions.Shared.ConnectionInfo
class to specify connection string at through your code. You can store these connection parameters in a separate file (App. settings file) and read them in your code from there. simply edit this file when you want to change connection so any computer can run your application. See documentation for this class and use it.
See this method for reference
private void SetConnectionInfo (string table, string server, string database, string user, string password)
{
TableLogOnInfo logOnInfo = new TableLogOnInfo();
logOnInfo = Report.Database.Tables[table].LogOnInfo;
ConnectionInfo connectionInfo = new ConnectionInfo ();
connectionInfo = logOnInfo.ConnectionInfo;
connectionInfo.DatabaseName = database;
connectionInfo.ServerName = server;
connectionInfo.Password = password;
connectionInfo.UserID = user;
Report.Database.Tables [table].ApplyLogOnInfo(logOnInfo);
}
Hope this might be helpful to you.
--
Thanks