Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            BB_g_j_skTj rpt = new BB_g_j_skTj();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void   displayBB(string Time_begin, string Time_end)
        {
            common_file.common_app.get_czsj();
            //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(common_file.common_app.yydh, common_file.common_app.qymc, dt1.ToString(), dt2.ToString(), sel_cond, loadType, common_file.common_app.czy, DateTime.Now.ToString(), common_file.common_app.xxzs);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                p_gl.Visible = false;
                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_skTj myreport = new BB_g_j_skTj();
                myreport.SetDataSource(ds.Tables[0]);
                common_bb.displayprogress(progressBar1);
                myreport.SetParameterValue("fx_type", fx_type);
                myreport.SetParameterValue("fxdr", fxdr);
                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;
            }
        }