I tried setting Data Source=Parameters!ServerName.Value;Initial Catalog=Parameters!DBName.Value
in the connection string in the dataset of my .rdl solution and Passing the datasource and initial catalog as parameters to reportviewer
reportParam[1] =
new ReportParameter("DatsSource", Convert.ToString(Datasource));reportParam[2] = new ReportParameter("InitialCatalog", Convert.ToString(InitialCatalog));
// The datasource and initial catalog strings were defined already
..This doesnt work.. it fails to connect to the server..
Can some one suggest a better way f doing it ?
Thanks
Replies
Know the answer? Post it — somebody with the same question will find it here.