private void BindReport() { IList<TblContactMaster> values1; dynamic result; DataSet ds = new DataSet(); string sAccoutList = String.Join(";", lstAccountType.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray()); string sStateList = String.Join(";", lstState.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray()); string sPlatform = String.Join(";", lstPlatform.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray()); //string sAccount = String.Join(";", lstAccount.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray()); string sAccount2 = String.Join(";", lstAccount2.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray()); string sCSN = String.Join(";", lstCSN.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray()); string sTerritory = String.Join(";", lstTerritory.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray()); string sMassMail = String.Join(";", lstMassMail.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray()); string sAccount = String.Join(";", lstAccount.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray()); clsReports obclsReports = new clsReports(); ds = obclsReports.BuyersList(sAccoutList, sStateList, sPlatform, sAccount, sAccount2, sCSN, sTerritory, sMassMail); ReportDataSource rds = new ReportDataSource("DataSet1", ds.Tables[0]); ReportViewer1.LocalReport.DataSources.Clear(); ReportParameter[] rParam = new ReportParameter[chkColumnList.Items.Count]; for (Int32 i = 0; i < chkColumnList.Items.Count; i++) { rParam[i] = new ReportParameter(chkColumnList.Items[i].Value, (chkColumnList.Items[i].Selected == true ? "True" : "false")); } ReportViewer1.LocalReport.SetParameters(rParam); ReportViewer1.LocalReport.DataSources.Add(rds); ReportViewer1.LocalReport.Refresh(); }