Example #1
0
        private void BindReport()
        {
           string values11 = String.Join(";", lstPrincipal.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
        //   string vPlatform = String.Join(";", lstPlatform.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
        //   values11 = values11.Insert(0, "'");
          // values11 = values11.Insert(values11.Length, "'");
           // string[] sval = (lstPrincipal.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
          //  string sval11 = (lstState.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToString());
            IList<TblCSNList> values1;
        
            dynamic result;

            DataSet ds = new DataSet();
            clsReports  obclsReports = new clsReports();
            ds = obclsReports.MfgPrincipalContactList(values11);



                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();
          

            
        }
Example #2
0
        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();


            
        }
Example #3
0
 private void BindReport()
 {
    // string values = String.Join(", ", ddlCaption.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
     string values = String.Join(",", ddlCaption.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
     string vTerritory = String.Join(";", lstTerritory.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
     string vState = String.Join(",", lstState.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
     string[] sval = (ddlCaption.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
     IList<TblCSNList> values1; 
     dynamic result;
     DataSet ds = new DataSet();
     clsReports obclsReports = new clsReports();
     ds = obclsReports.CSNList(values, vTerritory,vState); 
     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(); 
 }
Example #4
0
        private void BindReport()
        {  
         
            
            string pCSNID = String.Join(";", lstCSNRep.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
            string pAccount = String.Join(";", lstAccount.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
            string pPrincipal = String.Join(";", lstPrincipal.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
            string pInitiativeResult = String.Join(";", lstInitiativeResult.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
            string pInitiativeID = String.Join(";", lstInitiativeDescription.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray()); 
            string sinitlable= String.Join(", ", lstInitiativeDescription.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Text).ToArray());
            string pInitStatus = String.Join(";", lstInitiativeStatus.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
            string pInitiativeEntryStatus = String.Join(";", lstInitiativeEntryStatus.Items.Cast<ListItem>().Where(i => i.Selected).Select(i => i.Value).ToArray());
            

            IList<TblCSNList> values1;

            dynamic result;

            DataSet ds = new DataSet();
            clsReports obclsReports = new clsReports();

            dynamic obj2 = new ExpandoObject();
            obj2.CSNID = pCSNID;
            obj2.MfgID = pPrincipal;
            obj2.AccountID = pAccount;
            obj2.InitResultsID = pInitiativeResult;
            obj2.InitID = pInitiativeID;
            obj2.InitStatus = pInitStatus;
            obj2.InitEntryStatus = pInitiativeEntryStatus;

            ds = obclsReports.RPT_InitiativeResults(obj2); 

            ReportDataSource rds = new ReportDataSource("DataSet1", ds.Tables[0]);
            ReportViewer1.LocalReport.DataSources.Clear();

            ReportParameter[] rParam = new ReportParameter[chkColumnList.Items.Count+1];

            for (Int32 i = 0; i < chkColumnList.Items.Count+1; i++)
            {
                if (i == chkColumnList.Items.Count)
                {
                    rParam[i] = new ReportParameter("ReportHeader", sinitlable);
                }
                else
                {

                    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();

        }