IFrame

IFrame

  • NA
  • 1
  • 0

reg dynamic datasources

Jun 14 2006 3:23 AM
How do we pass the Initial catalog(DB Name) and the  datasource name (Server name) to the rdl file which i call using my report viewer object From a Webpage (C#)....i need to do it so that the same .rdl solution can be used for multiple datasources.
 
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