Example #1
0
 private void Getfxsj(string Time_begin, string Time_end)
 {
     if (dt2 < dt1)
     {
         common_file.common_app.Message_box_show(common_file.common_app.message_title, "结束时间早于起始时间,请正确选择结束时间");
         return;
     }
     common_file.common_app.get_czsj();
     if (tb_value.Text.Trim().Replace("'", "-") != "")
     {
         ls_condition += "  and  xsy  like  '%" + tb_value.Text.Trim().Replace("'", "-") + "%'";
     }
     ds = common_bb.GetData(dt1.ToString(), dt2.ToString(), common_bb.xsy_krly_xydw_xsy, tb_value.Text.Trim().Replace("'", "-"), "true", common_bb.xsy_krly_xydw_xydw, ls_condition);
     if (ds != null && ds.Tables[0].Rows.Count > 0)
     {
         p_gl.Visible = false;
         common_bb.displayprogress(progressBar1);
         BB_syxffx_xsy_xydw myreport = new BB_syxffx_xsy_xydw();
         myreport.SetDataSource(ds.Tables[0]);
         myreport.SetParameterValue("fx_type", "销售员");
         myreport.SetParameterValue("fxdr", "销售员协议单位分析");
         myreport.SetParameterValue("cssj", DateTime.Parse(Time_begin.Trim().Replace('/', '-')).Date.ToShortDateString());
         myreport.SetParameterValue("jssj", DateTime.Parse(Time_end.Trim().Replace('/', '-')).Date.ToShortDateString());
         crystalReportViewer1.ReportSource = myreport;
     }
     else
     {
         crystalReportViewer1.ReportSource = null;
         common_file.common_app.Message_box_show(common_file.common_app.message_title, "没有分析数据,请更改查询条件!");
         return;
     }
 }
Example #2
0
        private void Getfxsj(string Time_begin, string Time_end)
        {
            Cursor.Current = Cursors.WaitCursor;
            if (dt2 < dt1)
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "结束时间早于起始时间,请正确选择结束时间");
                return;
            }
            Cursor.Current = Cursors.WaitCursor;

            ds = common_bb.GetDatahy(dt1.ToShortDateString(), dt2.ToString(), common_bb.xsy_krly_xydw_xsy, tb_value.Text, "false", "", "");
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                p_gl.Visible = false;
                common_bb.displayprogress(progressBar1);
                BB_syxffx_xsy_xydw myreport = new BB_syxffx_xsy_xydw();
                myreport.SetDataSource(ds.Tables[0]);
                myreport.SetParameterValue("fx_type", "会员卡消费");
                myreport.SetParameterValue("fxdr", "会员卡消费");
                myreport.SetParameterValue("cssj", DateTime.Parse(Time_begin.Trim().Replace('/', '-')).Date.ToShortDateString());
                myreport.SetParameterValue("jssj", DateTime.Parse(Time_end.Trim().Replace('/', '-')).Date.ToShortDateString());

                crystalReportViewer1.ReportSource = myreport;
                Cursor.Current = Cursors.Default;
            }
            else
            {
                crystalReportViewer1.ReportSource = null;
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "没有分析数据,请更改查询条件!");
            }
        }
Example #3
0
 private void Getfxsj(string Time_begin, string Time_end)
 {
     //dt1 = DateTime.Parse(Time_begin.Trim().Replace('/', '-'));
     //dt2 = DateTime.Parse(Time_end.Trim().Replace('/', '-') + "  23:59:59");
     if (dt2 < dt1)
     {
         common_file.common_app.Message_box_show(common_file.common_app.message_title, "结束时间早于起始时间,请正确选择结束时间");
         return;
     }
     ds = common_bb.GetData(dt1.ToShortDateString(), dt2.ToString(), common_bb.xsy_krly_xydw_gj_sf, tb_value.Text, "false", "", "  and krgj='" + common_file.common_app.krgj_zg + "'  ");
     if (ds != null && ds.Tables[0].Rows.Count > 0)
     {
         p_gl.Visible = false;
         common_bb.displayprogress(progressBar1);
         BB_syxffx_xsy_xydw myreport = new BB_syxffx_xsy_xydw();
         myreport.SetDataSource(ds.Tables[0]);
         myreport.SetParameterValue("fx_type", "省份");
         myreport.SetParameterValue("fxdr", "省份城市分析");
         myreport.SetParameterValue("cssj", DateTime.Parse(Time_begin.Trim().Replace('/', '-')).Date.ToShortDateString());
         myreport.SetParameterValue("jssj", DateTime.Parse(Time_end.Trim().Replace('/', '-')).Date.ToShortDateString());
         crystalReportViewer1.ReportSource = myreport;
     }
     else
     {
         crystalReportViewer1.ReportSource = null;
         common_file.common_app.Message_box_show(common_file.common_app.message_title, "没有分析数据,请更改查询条件!");
         return;
     }
 }
Example #4
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            BB_syxffx_xsy_xydw rpt = new BB_syxffx_xsy_xydw();

            rpt.Site = this.Site;
            return(rpt);
        }