예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            BB_g_j_mxfx rpt = new BB_g_j_mxfx();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        private void displayBB(string Time_begin, string Time_end)
        {
            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;
            }
            ds = common_bb.GetFxData_j_g_mx(common_file.common_app.yydh, common_file.common_app.qymc, dt1.ToString(), dt2.ToString(), sel_cond, loadType, common_file.common_app.czy, tb_value.Text.Trim(), DateTime.Now.ToString(), common_file.common_app.xxzs);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                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_g_j_mxfx myreport = new BB_g_j_mxfx();
                myreport.SetDataSource(ds.Tables[0]);
                myreport.SetParameterValue("g_j_Type", g_j_Type);
                myreport.SetParameterValue("fx_Type", fx_Type);
                //myreport.SetParameterValue("zgz_zjz", zgz_zjz);
                myreport.SetParameterValue("cssj", DateTime.Parse(Time_begin.Trim().Replace('/', '-')).Date.ToShortDateString());
                myreport.SetParameterValue("jssj", DateTime.Parse(Time_end.Trim().Replace('/', '-')).Date.ToShortDateString());
                myreport.SetParameterValue("qymc", _qymc);
                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;
            }
        }