Exemple #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            InOutRece rpt = new InOutRece();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
            try
            {
                InOutReceAll all;
                string       countType = CountType;
                if (countType != null)
                {
                    if (!(countType == "0"))
                    {
                        if (countType == "1")
                        {
                            goto Label_00E3;
                        }
                    }
                    else
                    {
                        InOutRece rece = new InOutRece();
                        rece.SetDataSource(dsRpt.Tables["InOutRece"]);
                        if (Paramets != null)
                        {
                            rece.SetParameterValue("statusTime", Paramets[0]);
                            rece.SetParameterValue("endTime", Paramets[1]);
                            rece.SetParameterValue("userName", Paramets[2]);
                            rece.SetParameterValue("WHName", Paramets[3]);
                            rece.SetParameterValue("matInfo", Paramets[4]);
                            rece.SetParameterValue("rpsTitleStr", rpsTitleStr);
                        }
                        this.crystalReportViewer1.ReportSource = rece;
                    }
                }
                return;

Label_00E3:
                all = new InOutReceAll();
                all.SetDataSource(dsRpt.Tables["InOutReceAll"]);
                if (Paramets != null)
                {
                    all.SetParameterValue("statusTime", Paramets[0]);
                    all.SetParameterValue("endTime", Paramets[1]);
                    all.SetParameterValue("userName", Paramets[2]);
                    all.SetParameterValue("WHName", Paramets[3]);
                    all.SetParameterValue("matInfo", Paramets[4]);
                    all.SetParameterValue("rpsTitleStr", rpsTitleStr);
                }
                this.crystalReportViewer1.ReportSource = all;
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Exemple #3
0
        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
            try
            {
                switch (FrmRptShow.CountType)
                {
                case "0":
                    InOutRece S0 = new InOutRece();
                    S0.SetDataSource(dsRpt.Tables["InOutRece"]);
                    if (Paramets != null)
                    {
                        S0.SetParameterValue("statusTime", Paramets[0]);
                        S0.SetParameterValue("endTime", Paramets[1]);
                        S0.SetParameterValue("userName", Paramets[2]);
                        S0.SetParameterValue("WHName", Paramets[3]);
                        S0.SetParameterValue("matInfo", Paramets[4]);
                        S0.SetParameterValue("rpsTitleStr", rpsTitleStr);
                    }
                    this.crystalReportViewer1.ReportSource = S0;
                    break;

                case "1":
                    InOutReceAll S0All = new InOutReceAll();
                    S0All.SetDataSource(dsRpt.Tables["InOutReceAll"]);
                    if (Paramets != null)
                    {
                        S0All.SetParameterValue("statusTime", Paramets[0]);
                        S0All.SetParameterValue("endTime", Paramets[1]);
                        S0All.SetParameterValue("userName", Paramets[2]);
                        S0All.SetParameterValue("WHName", Paramets[3]);
                        S0All.SetParameterValue("matInfo", Paramets[4]);
                        S0All.SetParameterValue("rpsTitleStr", rpsTitleStr);
                    }
                    this.crystalReportViewer1.ReportSource = S0All;
                    break;
                }
            }
            catch (Exception er)
            {
                MessageBox.Show(er.Message);
            }
        }