コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            BB_ds rpt = new BB_ds();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        private void displayBB(string sql_0, string sql_other)
        {
            common_file.common_app.get_czsj();
            sel_str = "";
            //DateTime dt1 = DateTime.Parse(Time_begin.Trim().Replace('/', '-'));
            //DateTime 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;
            // }

            //url = common_file.common_app.service_url;
            //url += "BBfx/BBfx_app.asmx";
            ////yydh, qymc, cssj, jssj, czsj, czy_temp, xxzs
            //object[] args = new object[7];
            //args[0] = common_file.common_app.yydh;
            //args[1] = common_file.common_app.qymc;
            //args[2] = dt1.ToString();
            //args[3] = dt2.ToString();
            //args[4] = DateTime.Now.ToString();
            //args[5] = common_file.common_app.czy;
            //args[6] = common_file.common_app.xxzs;
            //object result = Hotel_app.DynamicWebServiceCall.InvokeWebService(url, "get_ds_fx", args);
            //if (result.ToString() == common_file.common_app.get_suc)
            //{
            //sel_str = " id>=0  and   yydh='" + common_file.common_app.yydh + "'  and czy_temp='"+common_file.common_app.czy+"' ";
            //ds = B_common.GetList(" select *  from BB_dsfx_temp  ", sel_str);
            sel_str = " id>=0  and  xfdr='" + Szwgl.common_zw.dr_ds + "' and   yydh='" + common_file.common_app.yydh + "' " + sql_0 + sql_other + "  order by  xsy , xfsj  Desc  ";
            //ds = B_common.GetList(" select krxm,xfxm,fjrb,fjbh,xfsj,sjxfje,xydw,xsy,xfzy,xfbz  from VS_syxfmx_cz  ", sel_str);
            ds = B_common.GetList(" select *  from VS_syxfmx_cz  ", sel_str);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                p_gl.Visible = false;
                common_bb.displayprogress(progressBar1);
                string _qymc = ""; string _qymc_english = ""; string _address_chinese = ""; string _address_english = ""; string _qydh = ""; string _qycz = ""; string _qyyb = ""; string _website = "";
                common_file.common_app.GetPrintInfo(ref _qymc, ref _qymc_english, ref _address_chinese, ref _address_english, ref _qydh, ref _qycz, ref _qyyb, ref _website);
                BB_ds myreport = new BB_ds();
                myreport.SetDataSource(ds.Tables[0]);

                myreport.SetParameterValue("qymc", common_file.common_app.qymc);
                myreport.SetParameterValue("cssj", Time_begin.Trim().Replace('/', '-'));
                myreport.SetParameterValue("jssj", Time_end.Trim().Replace('/', '-'));
                myreport.SetParameterValue("TimeInfo", "从" + DateTime.Parse(Time_begin).Date.ToShortDateString() + "到" + DateTime.Parse(Time_end).Date.ToShortDateString());
                myreport.SetParameterValue("address", _address_chinese);
                myreport.SetParameterValue("Tel", _qydh);
                myreport.SetParameterValue("Fax", _qycz);
                crystalReportViewer1.ReportSource = myreport;
            }
            else
            {
                crystalReportViewer1.ReportSource = null;
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "当前时间段内没有分析数据,您可以更改查询条件来获取其它的分析数据!");
                //return;
            }
            //}
        }