SetDatasourceCredentials
CRMDataSource
WhoAmIRequest req = new WhoAmIRequest(); WhoAmIResponse resp = (WhoAmIResponse)sysService.Execute(req); string userName = resp.UserId.ToString(); string password = resp.OrganizationId.ToString(); eporting.WebForms.Internal.Soap.ReportingServices2005.Execution.DataSourceCredentials dsc = new Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.DataSourceCredentials(); dsc.DataSourceName = "CRMDataSource"; //this is DataSource name in the actual Report. dsc.Password = password; //orgId dsc.UserName = userName; //userId Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.DataSourceCredentials[] Credentials = new Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.DataSourceCredentials[1]; Credentials[0] = dsc; rs.SetExecutionCredentials(Credentials);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)