public void CreateView()
        {
            string status = ddlStatus.SelectedValue;
            string code = ddlDeptName.SelectedValue;
            int cMonth = Convert.ToInt32(ddlCurrMonth.SelectedValue);
            int fMonth = Convert.ToInt32(ddlFirstPreviousMonth.SelectedValue);
            int sMonth = Convert.ToInt32(ddlSecPreviousMonth.SelectedValue);

            if (ddlSelectType.SelectedValue == "Multiple")
            {
                bool chk = bll.ChkMonth(cMonth, fMonth);
                if (chk == false)
                {
                    lblMessage.Visible = true;
                    lblMessage.Text = "* please choose again......";
                }
                else
                {
                    IList list = bll.DeptRequestReportMultiple(code, fMonth, cMonth, status);
                    if (list.Count <= 0)
                    {
                        lblMessages.Visible = true;
                        lblMessages.Text = "No Data Found in One or More Months";
                    }
                    else
                    {
                        ReportDocument doc = new TrendForEachDept();
                        doc.SetDataSource(list);
                        rptViewTrendForDept.ReportSource = doc;
                        rptViewTrendForDept.RefreshReport();
                        //ddd
                    }
                }
            }
            else
            {
                int fmYear = bll.GetYear(cMonth, fMonth);
                int smYear = bll.GetYear(cMonth, sMonth);

                IList list = bll.DeptRequestRepostThree(code, fMonth, sMonth, cMonth, fmYear, smYear, status);
                ReportDocument doc = new TrendForEachDept();
                doc.SetDataSource(list);
                rptViewTrendForDept.ReportSource = doc;
                rptViewTrendForDept.RefreshReport();
            }
        }
コード例 #2
0
        protected void CreateRpt()
        {
            string code = ddlDeptName.SelectedValue;
            int cMonth = Convert.ToInt32(ddlCurrentMonth.SelectedValue);
            int pMonth = Convert.ToInt32(ddlPastMonth.SelectedValue);
            bool chk = bll.ChkMonth(cMonth, pMonth);

            if (chk == false)
            {
                lblMessage.Visible = true;
                lblMessage.Text = "* please choose again......";
            }
            else
            {
                lblMessage.Visible = false;
                List<sp_DeptReqReport_Result> list = bll.DeptRequestReport(code, pMonth, cMonth);

                ReportDocument report = new TrendForEachDept();
                report.SetDataSource(list);
                rptDeptTrendView.ReportSource = report;
                rptDeptTrendView.RefreshReport();

            }
        }
コード例 #3
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     TrendForEachDept rpt = new TrendForEachDept();
     rpt.Site = this.Site;
     return rpt;
 }