コード例 #1
0
        //Load Report
        private void LoadResignMember()
        {
            ResignMemberReport.Reset();
            DataTable        dt         = getResignData();
            ReportDataSource masterData = new ReportDataSource("AnnualStatement", dt);

            ResignMemberReport.LocalReport.DataSources.Add(masterData);
            ResignMemberReport.LocalReport.ReportEmbeddedResource = "Nube.Reports.MonthlyStatement.rdlc";
            //   ResignMemberReport.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(Details);

            ReportParameter[] rp = new ReportParameter[3];
            rp[0] = new ReportParameter("BranchName", cmbNubeBranch.SelectedValue.ToString());
            rp[1] = new ReportParameter("Month", String.Format("{0:MMM-yyyy}", dtpDate.SelectedDate.Value));
            rp[2] = new ReportParameter("Title", "Resigned Member");

            ResignMemberReport.LocalReport.SetParameters(rp);

            ResignMemberReport.RefreshReport();
        }
コード例 #2
0
        private void LoadResignMember()
        {
            ResignMemberReport.Reset();
            DataTable dt = getResignData();

            if (dt.Rows.Count > 0)
            {
                ReportDataSource masterData = new ReportDataSource("BranchAdviceList", dt);

                ResignMemberReport.LocalReport.DataSources.Add(masterData);
                ResignMemberReport.LocalReport.ReportEmbeddedResource = "Nube.Reports.NUBEBranchAdviceList.rdlc";
                ReportParameter[] rp = new ReportParameter[3];
                if (!string.IsNullOrEmpty(cmbBranch.Text))
                {
                    rp[0] = new ReportParameter("BranchName", "Branch Name : " + cmbBranch.Text);
                }
                else
                {
                    rp[0] = new ReportParameter("BranchName", "");
                }
                rp[1] = new ReportParameter("Month", String.Format("{0:dd MMM yyyy} - {1:dd MMM yyyy}", dtpDateFrom.SelectedDate.Value, dtpDateTo.SelectedDate.Value));
                if (!string.IsNullOrEmpty(cmbBranch.Text))
                {
                    rp[2] = new ReportParameter("BranchCode", cmbBranch.SelectedValue.ToString());
                }
                else
                {
                    rp[2] = new ReportParameter("BranchCode", "");
                }
                ResignMemberReport.LocalReport.SetParameters(rp);

                ResignMemberReport.RefreshReport();
            }
            else
            {
                MessageBox.Show("Resigned Member's Not Found !");
            }
        }