Ejemplo n.º 1
0
        void PrintRdlc_bmdy(string tjbh, string tjcs, string str_jkzbh)
        {
            DataTable dt1 = tjdjbiz.TjJkzbb(str_jkzbh, tjbh, tjcs);

            if (dt1.Rows.Count <= 0)
            {
                MessageBox.Show("请确认已经保存办证信息!", "提示");
                return;
            }


            LocalReport report2 = new LocalReport();

            report2.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_jkz_foot.rdlc";
            report2.EnableExternalImages = true;

            ReportParameter rp1 = new ReportParameter("jkzbh", str_jkzbh);
            ReportParameter rp2 = new ReportParameter("tjbh", tjbh);
            ReportParameter rp3 = new ReportParameter("tjcs", tjcs);
            ReportParameter rp4 = new ReportParameter("bbmc", Program.sys_reportname);



            report2.DataSources.Clear();
            report2.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4 });
            report2.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_jkzxx", dt1));

            //reportViewer1.RefreshReport();

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report2, "健康证", false, "jkzfoot");
        }
Ejemplo n.º 2
0
        private void btn_cybbprint_Click(object sender, EventArgs e)
        {
            if (str_tjbh == "" || str_tjcs == "")
            {
                return;
            }
            if (txt_djlsh.Text.Trim() == "")
            {
                return;
            }

            LocalReport report = new LocalReport();

            DataTable dt1 = rdlcbiz.Get_v_tj_tjdjb(str_tjbh, str_tjcs);
            DataTable dt2 = rdlcbiz.Get_cytj_jkjcbg(str_tjbh, str_tjcs);

            report.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_cyjkbg.rdlc";
            report.EnableExternalImages = true;
            ReportParameter rp1 = new ReportParameter("tjbh", str_tjbh);
            ReportParameter rp2 = new ReportParameter("tjcs", str_tjcs);
            ReportParameter rp3 = new ReportParameter("bbmc", Program.reg_dwmc);

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt1));
            report.DataSources.Add(new ReportDataSource("PEISDataSet_Pro_cytj_jkjcbg", dt2));

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report, "从业健康体检报告", false, "A4");
            tjjgbiz.Update_tj_tjdjb_Dycs(str_tjbh, str_tjcs);//修改打印次数
            #region 日志记录
            loginbiz.WriteLog(this.Name.Trim(), "【" + Program.username + "】" + "在电脑【" + ma.HostName() + "】上打印了" + str_tjbh + "的从业报告!IP:" + Program.hostip, Program.username);
            #endregion
        }
Ejemplo n.º 3
0
        void PrintRdlc(string tjbh, string tjcs, string djlsh)
        {
            BarcodeControl barcode = new BarcodeControl();

            barcode.BarcodeType = BarcodeType.CODE128C;
            barcode.Data        = djlsh;
            barcode.CopyRight   = "";
            MemoryStream stream = new MemoryStream();

            barcode.MakeImage(ImageFormat.Png, 1, 40, true, false, null, stream);
            Bitmap myimge = new Bitmap(stream);

            string str_path = Application.StartupPath + @"/barcode.png";

            myimge.Save(str_path, ImageFormat.Png);
            str_path = "file:///" + str_path;

            LocalReport report = new LocalReport();

            DataTable dt2 = rdlcbiz.Get_v_tj_tjdjb(tjbh, tjcs);

            report.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_tjtxm.rdlc";
            report.EnableExternalImages = true;
            ReportParameter rp1 = new ReportParameter("barcode", str_path);

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1 });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report, "体检条形码打印", false, "tmdy");
        }
Ejemplo n.º 4
0
        private void btn_zmdy_Click(object sender, EventArgs e)
        {
            if (txgtJkzbh.Text == "" || txtJkzXm.Text == "")
            {
                MessageBox.Show("请选择要打印的人员!", "提示");
                return;
            }

            DataTable dt1 = tjdjBiz.TjJkzbb(str_jkzbh, str_tjbh, str_tjcs);

            if (dt1.Rows.Count <= 0)
            {
                MessageBox.Show("请确认已经保存办证信息!", "提示");
                return;
            }

            pw.StartThread();

            LocalReport report = new LocalReport();

            report.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_jkz_head.rdlc";
            report.EnableExternalImages = true;



            ReportParameter rp1 = new ReportParameter("jkzbh", str_jkzbh);
            ReportParameter rp2 = new ReportParameter("tjbh", str_tjbh);
            ReportParameter rp3 = new ReportParameter("tjcs", str_tjcs);
            ReportParameter rp4 = new ReportParameter("bbmc", Program.sys_reportname);

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4 });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_jkzxx", dt1));



            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            //rdlcprint.Hxdy = true;
            rdlcprint.Run(report, "健康证", false, "jkzhead");
            //rdlcprint.Run(report, "健康证", false, "A4");


            //try
            //{
            //    tjdjBiz.TjJkzDycsSave(str_jkzbh, str_tjbh, str_tjcs, 1);
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.ToString());
            //}

            #region 日志记录
            loginbiz.WriteLog(this.Name.Trim(), "【" + Program.username + "】" + "在电脑【" + ma.HostName() + "】上打印了" + str_tjbh + "的健康证!IP:" + Program.hostip, Program.username);
            #endregion
            pw.StopThread();
        }
Ejemplo n.º 5
0
        private void bt_print_Click(object sender, EventArgs e)
        {
            pw.StartThread();
            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Hxdy = true;
            rdlcprint.Run(reportView.LocalReport, "单据打印", false, "tjjgdy");
            pw.StopThread();
        }
Ejemplo n.º 6
0
        private void bt_print_Click(object sender, EventArgs e)
        {
            if (str_tjbh == "" || str_tjcs == "")
            {
                return;
            }
            if (str_sumover != "2")
            {
                return;                     //未保存,生成结论
            }
            pw.StartThread();
            LocalReport report = new LocalReport();
            DataTable   dt     = tjjgbiz.Get_v_tj_zyjgb(str_tjbh, str_tjcs);

            byte[]     bytes   = PEIS.Properties.Resources.Report_tjbg_zytj;
            FileStream fstream = File.Create(@"C:\WINDOWS\Temp\Report_tjbg_temp", bytes.Length);

            try
            {
                fstream.Write(bytes, 0, bytes.Length);   //二进制转换成文件
            }
            catch (Exception ex)
            {
                //抛出异常信息
                MessageBox.Show("报表文件处理异常,请联系技术支持人员!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            finally
            {
                fstream.Close();
            }
            File.Copy(@"C:\WINDOWS\Temp\Report_tjbg_temp", @"C:\WINDOWS\Temp\Report_tjbg_zytj", true);
            report.ReportPath = @"C:\WINDOWS\Temp\Report_tjbg_zytj";
            //report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg_zytj.rdlc";
            report.DisplayName          = "蒙藏医体质识别报告";
            report.EnableExternalImages = true;
            report.DataSources.Clear();
            string str_ZYBG_Top = Application.StartupPath + @"/Img/ZYBG_Top.png";

            str_ZYBG_Top = "file:///" + str_ZYBG_Top;
            ReportParameter rp     = new ReportParameter("dwmc", Program.reg_dwmc);
            ReportParameter rp_top = new ReportParameter("ZYBG_Top", str_ZYBG_Top);

            report.SetParameters(new ReportParameter[] { rp, rp_top });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_zyjgb", dt));

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report, "蒙藏医体质识别报告", false, "A4");

            pw.StopThread();
        }
Ejemplo n.º 7
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            if (object.Equals(null, dgvJbxx.CurrentRow))
            {
                return;
            }
            if (dgvJbxx.Rows.Count < 1)
            {
                return;
            }
            pw.StartThread();
            foreach (DataGridViewRow dgr in dgvJbxx.Rows)
            {
                if (dgr.Cells["xz"].Value.ToString().Trim() == "1")
                {
                    string    str_tjbh  = dgr.Cells["tjbh"].Value.ToString().Trim();
                    string    str_tjcs  = dgr.Cells["tjcs"].Value.ToString().Trim();
                    string    str_jkzbh = dgr.Cells["jkzbh"].Value.ToString().Trim();
                    DataTable dt1       = tjdjBiz.TjJkzbb(str_jkzbh, str_tjbh, str_tjcs);
                    if (dt1.Rows.Count <= 0)
                    {
                        MessageBox.Show("请确认已经保存办证信息!", "提示");
                        pw.StopThread();
                        return;
                    }
                    LocalReport report = new LocalReport();
                    report.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_pxz_head.rdlc";
                    report.EnableExternalImages = true;

                    ReportParameter rp1 = new ReportParameter("jkzbh", str_jkzbh);
                    ReportParameter rp2 = new ReportParameter("tjbh", str_tjbh);
                    ReportParameter rp3 = new ReportParameter("tjcs", str_tjcs);
                    ReportParameter rp4 = new ReportParameter("bbmc", Program.reg_dwmc);
                    ReportParameter rp5 = new ReportParameter("pxnr", txt_pxnr.Text.Trim());
                    report.DataSources.Clear();
                    report.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5 });
                    report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_jkzxx", dt1));

                    //report2.DataSources.Clear();
                    //report2.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4 });
                    //report2.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_jkzxx", dt1));

                    //reportViewer1.RefreshReport();

                    RdlcPrintNew rdlcprint = new RdlcPrintNew();
                    //rdlcprint.Hxdy = true;
                    rdlcprint.Run(report, "培训证", false, "pxzhead");
                }
            }
            pw.StopThread();
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 按体检中的组合项目打印检验报告
        /// </summary>
        /// <param name="djlsh">登记流水号</param>
        /// <param name="jyjx">检验机器</param>
        public void PrintJyjg_zhxm(string djlsh, string zhxm)
        {
            LocalReport report = new LocalReport();

            PEIS.jkgl.LisBiz lisBiz = new PEIS.jkgl.LisBiz();

            DataTable dt2 = lisBiz.GetJyjg(djlsh, zhxm);

            if (dt2.Rows.Count == 0)
            {
                //MessageBox.Show("请先保存检验结果,再打印检验报告!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_jybg_dy.rdlc";
            //report.EnableExternalImages = true;

            string jyjx  = dt2.Rows[0]["jyjx"].ToString().Trim();
            string title = "";

            if (jyjx == "0001")
            {
                //yb = "(小便)";
                title = "尿液常规";
            }
            else if (jyjx == "0002" || jyjx == "0004")
            {
                //yb = "(血液)";
                title = "血液细胞分析";
            }
            else if (jyjx == "0003")
            {
                //yb = "(血清)";
                title = "血液生化";
            }
            title         = strTitle + title;
            XtNumber.Name = jyjx;
            ReportParameter rp1 = new ReportParameter("title", Program.reg_dwmc);
            ReportParameter rp2 = new ReportParameter("dysj", xtBiz.GetDataNow().ToString());

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1, rp2 });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_jy_jybg", dt2));

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report, "检验报告打印" + jyjx, false, "A4");
        }
Ejemplo n.º 9
0
        private void btn_export_Click(object sender, EventArgs e)
        {
            if (object.Equals(null, dataGridView1.CurrentRow))
            {
                return;
            }
            if (dataGridView1.Rows.Count < 1)
            {
                return;
            }
            rdlcBiz rdlcbiz = new rdlcBiz();

            foreach (DataGridViewRow dgr in dataGridView1.Rows)
            {
                if (dgr.Cells["xz"].Value.ToString().Trim() == "1")
                {
                    string str_tjbh = dgr.Cells["djlsh"].Value.ToString().Trim();


                    DataTable   dt2    = rdlcbiz.Get_v_jy_jybgdy(str_tjbh);
                    LocalReport report = new LocalReport();
                    report.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_jybgdy.rdlc";
                    report.EnableExternalImages = true;

                    ReportParameter rp1 = new ReportParameter("djlsh", str_tjbh);
                    ReportParameter rp2 = new ReportParameter("zcdw", Program.reg_dwmc);


                    report.DataSources.Clear();
                    report.SetParameters(new ReportParameter[] { rp1, rp2 });
                    report.DataSources.Add(new ReportDataSource("PEISDataSet_v_jy_jybgdy", dt2));

                    RdlcPrintNew rdlcprint = new RdlcPrintNew();
                    try
                    {
                        rdlcprint.Run(report, "检验报告", false, "A4");
                    }
                    catch (Exception ex3)
                    {
                        MessageBox.Show(ex3.ToString());
                        return;
                    }
                }
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 打印检查表
        /// </summary>
        public void PrintJcb(string str_tjbh, string str_tjcs, string xm, string dwmc)
        {
            pw.StartThread();
            string number = xtBiz.GetHmz("tgjcb_bh", 1);
            int    len    = number.Length;

            for (int i = 0; i < 4 - len; i++)
            {
                number = "0" + number;
            }

            string str_fph = xtBiz.GetHmz("tjbfph", 1);
            int    len2    = str_fph.Length;

            for (int j = 0; j < 7 - len; j++)
            {
                str_fph = "0" + str_fph;
            }



            this.strTjbh = str_tjbh;
            this.strTjcs = str_tjcs;


            LocalReport report = new LocalReport();

            report.SubreportProcessing += new SubreportProcessingEventHandler(report_SubreportProcessing_Jcb);
            report.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_jcb_main.rdlc";
            report.EnableExternalImages = true;
            ReportParameter rp1 = new ReportParameter("bgrq", xtBiz.GetDataNow().ToString("yyyy年MM月dd日"));
            ReportParameter rp2 = new ReportParameter("title", Program.reg_dwmc);
            ReportParameter rp3 = new ReportParameter("number", number);
            ReportParameter rp4 = new ReportParameter("fph", str_fph);

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4 });

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report, "体格检查表", false, "A4");
            loginbiz.Insert_fplog(str_fph, xm, dwmc, Program.username);
            pw.StopThread();
        }
Ejemplo n.º 11
0
        void PrintRdlc(string tjbh, string tjcs, string djlsh)
        {
            BarcodeControl barcode = new BarcodeControl();

            barcode.BarcodeType = BarcodeType.CODE128C;
            barcode.Data        = djlsh;
            barcode.CopyRight   = "";
            MemoryStream stream = new MemoryStream();

            barcode.MakeImage(ImageFormat.Png, 1, 50, true, false, null, stream);
            Bitmap myimge = new Bitmap(stream);

            string str_path = Application.StartupPath + @"/barcode.png";

            myimge.Save(str_path, ImageFormat.Png);
            str_path = "file:///" + str_path;
            myimge.Dispose();              //201203
            string strLog = "file:///" + Application.StartupPath + @"/Img/log.jpg";

            //DataTable dt1 = rdlcbiz.Get_tj_tjjlb(tjbh, tjcs);
            DataTable dt2 = rdlcbiz.Get_v_tj_tjdjb(tjbh, tjcs);
            DataTable dt3 = rdlcbiz.Get_v_tj_fyxx(tjbh, tjcs);
            DataTable dt1 = rdlcbiz.Get_tj_tjjlb_ks(tjbh, tjcs);

            LocalReport report = new LocalReport();

            //report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjzyd.rdlc";
            report.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_tjzyd_zyb_0120.rdlc";//by zhz
            report.EnableExternalImages = true;
            ReportParameter rp1 = new ReportParameter("tjdw", Program.reg_dwmc);
            ReportParameter rp2 = new ReportParameter("barcode", str_path);
            ReportParameter rp3 = new ReportParameter("tjdh", str_dwdh);
            ReportParameter rp4 = new ReportParameter("log", strLog);

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4 });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_tj_tjjlb", dt1));
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_fyxx", dt3));

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report, "体检指引单打印", false, "A4");
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 打印检验报告
        /// </summary>
        /// <param name="djlsh">登记流水号</param>
        /// <param name="jyjx">检验机器</param>
        public void PrintJyjg(string djlsh, string jyjx)
        {
            LocalReport report = new LocalReport();

            DataTable dt2 = GetJyjg(djlsh, jyjx);

            if (dt2.Rows.Count <= 0)
            {
                MessageBox.Show("请先保存检验结果,再打印检验报告!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_jybg_dy.rdlc";
            //report.EnableExternalImages = true;
            string yb = "";

            if (jyjx == "0001")
            {
                yb = "(小便)";
            }
            else if (jyjx == "0002")
            {
                yb = "(血液)";
            }
            else if (jyjx == "0003")
            {
                yb = "(血清)";
            }
            string title = strTitle + yb;

            ReportParameter rp1 = new ReportParameter("title", Program.reg_dwmc);
            ReportParameter rp2 = new ReportParameter("dysj", xtBiz.GetDataNow().ToString());

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1, rp2 });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_jy_jybg", dt2));

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report, "检验报告打印", false, "A4");
        }
Ejemplo n.º 13
0
        //private PrintWaiting pw = new PrintWaiting();

        void PrintRdlc(string tjbh, string tjcs, string djlsh)
        {
            //pw

            BarcodeControl barcode = new BarcodeControl();

            barcode.BarcodeType = BarcodeType.CODE128C;
            barcode.Data        = djlsh;
            barcode.CopyRight   = "";
            MemoryStream stream = new MemoryStream();

            barcode.MakeImage(ImageFormat.Png, 1, 50, true, false, null, stream);
            Bitmap myimge = new Bitmap(stream);

            string str_path = Application.StartupPath + @"/barcode.png";

            myimge.Save(str_path, ImageFormat.Png);
            str_path = "file:///" + str_path;
            string sqd_ts = xtbiz.GetXtCsz("sqd_ts");

            LocalReport report = new LocalReport();

            DataTable dt1 = rdlcbiz.Get_tj_sqdlx_hd(tjbh, tjcs);
            DataTable dt2 = rdlcbiz.Get_v_tj_tjdjb(tjbh, tjcs);

            report.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_tjsqd.rdlc";
            report.EnableExternalImages = true;
            ReportParameter rp1 = new ReportParameter("tjdw", Program.reg_dwmc);
            ReportParameter rp2 = new ReportParameter("barcode", str_path);
            ReportParameter rp3 = new ReportParameter("sqd_ts", sqd_ts);

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_tj_sqdlx_hd", dt1));
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report, "体检申请单打印", false, "A4");
        }
Ejemplo n.º 14
0
        //private PrintWaiting pw = new PrintWaiting();

        void PrintRdlc(string tjbh, string tjcs, string djlsh)
        {
            //pw

            LocalReport report = new LocalReport();

            DataTable dt1 = rdlcbiz.Get_v_tj_tjdjb(str_tjbh, str_tjcs);
            DataTable dt2 = rdlcbiz.Get_cytj_jkjcbg(str_tjbh, str_tjcs);

            report.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_cyjkbg_kb.rdlc";
            report.EnableExternalImages = true;
            ReportParameter rp1 = new ReportParameter("tjbh", str_tjbh);
            ReportParameter rp2 = new ReportParameter("tjcs", str_tjcs);

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1, rp2 });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt1));
            report.DataSources.Add(new ReportDataSource("PEISDataSet_Pro_cytj_jkjcbg", dt2));

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report, "从业健康体检空表", false, "A4");
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 打印健康档案——高原
        /// </summary>
        /// <param name="tjbh"></param>
        /// <param name="tjcs"></param>
        public void PrintJkda_cwjc(string tjbh, string tjcs)
        {
            this.strTjbh = tjbh;
            this.strTjcs = tjcs;
            LocalReport report = new LocalReport();

            report.SubreportProcessing += new SubreportProcessingEventHandler(report_SubreportProcessing3);
            string    title = "铁路机车乘务员职业健康检查表";
            DataTable dt2   = GetZybRyxx(tjbh, tjcs);

            report.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_zyb_cwjc_jkda.rdlc";
            report.EnableExternalImages = true;
            //ReportParameter rp1 = new ReportParameter("dqrq", xtBiz.GetDataNow().ToString("yyyy-MM-dd"));
            ReportParameter rp2 = new ReportParameter("title", title);
            ReportParameter rp3 = new ReportParameter("bbmc", Program.reg_dwmc);

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp2, rp3 });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_zyb_ryxx", dt2));

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report, "铁路机车乘务员职业健康检查表打印", false, "A4");
        }
Ejemplo n.º 16
0
        private void bt_print_Click(object sender, EventArgs e)
        {
            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(reportView.LocalReport, "单据打印", false, "A4");
        }
Ejemplo n.º 17
0
        private void btnPrintFm_Click(object sender, EventArgs e)
        {
            string ys = txtYs.Text.Trim();
            ys = comn.CharConverter(ys);
            if (comn.Szyz(ys) == -1)
            {
                MessageBox.Show("页数格式错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (dtpFrom.Value > dtpTo.Value)
            {
                MessageBox.Show("开始日期不能大于结束日期!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = dtpFrom;
                return;
            }

            if (txtDw.Text == "")
            {
                txtDw.Tag = "";
                MessageBox.Show("请选择体检单位!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            pw.StartThread();
            string str_dwbh = txtDw.Tag.ToString().Trim();
            string str_bmbh = "";
            if (str_dwbh.Length > 4)
            {
                str_bmbh = str_dwbh;
                str_dwbh = str_dwbh.Substring(0, 4);
            }
            LocalReport report = new LocalReport();
            report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_jcjg_fm.rdlc";
            report.EnableExternalImages = true;
            DateTime dqrq = xtbiz.GetDataNow();


            string pagesl="";
            if (txtYs.Text.Trim() == "1") pagesl = "一";
            if (txtYs.Text.Trim() == "2") pagesl = "二";
            if (txtYs.Text.Trim() == "3") pagesl = "三";
            if (txtYs.Text.Trim() == "4") pagesl = "四";
            if (txtYs.Text.Trim() == "5") pagesl = "五";
            if (txtYs.Text.Trim() == "6") pagesl = "六";
            if (txtYs.Text.Trim() == "7") pagesl = "七";
            if (txtYs.Text.Trim() == "8") pagesl = "八";
            if (txtYs.Text.Trim() == "9") pagesl = "九";
            if (txtYs.Text.Trim() == "10") pagesl = "十";
            if (txtYs.Text.Trim() == "11") pagesl = "十一";
            if (txtYs.Text.Trim() == "12") pagesl = "十二";
            if (txtYs.Text.Trim() == "13") pagesl = "十三";
            if (txtYs.Text.Trim() == "14") pagesl = "十四";
            if (txtYs.Text.Trim() == "15") pagesl = "十五";
            if (txtYs.Text.Trim() == "16") pagesl = "十六";
            if (txtYs.Text.Trim() == "17") pagesl = "十七";
            if (txtYs.Text.Trim() == "18") pagesl = "十八";
            if (txtYs.Text.Trim() == "19") pagesl = "十九";
            if (txtYs.Text.Trim() == "20") pagesl = "二十";

            
            ReportParameter rp1 = new ReportParameter("dwmc", txtDw.Text.Trim());
           
            ReportParameter rp3 = new ReportParameter("bgrq", tzs.ChangeTime(dqrq));
         
            ReportParameter rp5 = new ReportParameter("ys", pagesl);
            
            ReportParameter rp4 = new ReportParameter("bbmc", Program.sys_reportname);

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1,  rp3, rp5 ,rp4});



            RdlcPrintNew rdlcprint = new RdlcPrintNew();
            rdlcprint.Hxdy = true;
            rdlcprint.Run(report, "体检通知书封面", false, "tjjgdy");
            pw.StopThread();

            #region 日志记录
            loginbiz.WriteLog(this.Name.Trim(), "【" + Program.username + "】" + "在电脑【" + ma.HostName() + "】上打印了职业健康汇总报告封面页!IP:" + Program.hostip, Program.username);
            #endregion
        }
Ejemplo n.º 18
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            #region 输入判断
            if (dtpFrom.Value > dtpTo.Value)
            {
                MessageBox.Show("开始日期不能大于结束日期!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = dtpFrom;
                return;
            }

            if (txtDw.Text == "")
            {
                txtDw.Tag = "";
                MessageBox.Show("请选择体检单位!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            #endregion

            pw.StartThread();

            #region 报表换行处理
            /////////////////////////////////////报表换行处理//////默认1行50个中文字符////////////////////////////////////////////////
            //增加行数的参数,控制显示的孙报表
            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            //string page1 = "";
            string page2 = "";
            string page3 = "";
            string page4 = "";
            string page5 = "";
            string page6 = "";
            string page7 = "";
            string page8 = "";
            string page9 = "";
            string page10 = "";
            //string str_zwhys = gzjwhys.ToString();
            //string str_rylb = dt.Rows[0]["rylb"].ToString();
            //string str_ztjrs = dt.Rows[0]["tjrs"].ToString();
            //string str_sql = ",
            //string str_sql2 = "    " + comn.CharConverter(tjrq) + str_sql;
            string str_maxlen = "";

            //str_maxlen = str_sql2 + str_sql.Replace("1", "1 ").Replace("0", "0 ").Replace("2", "2 ").Replace("8", "8 ").Replace("4", "4 ").Replace(",", ",");
            str_maxlen = richTextBox1.Text.Trim();
            //MessageBox.Show(str_maxlen.Length.ToString(),"");
            //string rownum="";
            //if (str_maxlen.Length > 500)
            //{
            //    MessageBox.Show("内容超过10行了(500个字),系统暂时不支持!", "提示");
            //    pw.StopThread();
            //    return;
            //}

            //try
            //{
            //    if (str_maxlen.Length <= 50)   //单行时
            //    {
            //        rownum = "1";
            //        page1 = str_maxlen;
            //    }
            //    else                           //多行时
            //    {
            //        if (str_maxlen.Length <= 100 && str_maxlen.Length >50) //2行
            //        {
            //            rownum = "2";
            //            ////处理倒数第2为是特殊符号的问题,最后1位则为空
            //            //if (str_maxlen.Substring(0, 49) == "," || str_maxlen.Substring(0, 49) == "。" || str_maxlen.Substring(0, 49) == "、" || str_maxlen.Substring(0, 49) == "+")
            //            //{
            //            //    str_maxlen = str_maxlen.Substring(0, 49);
            //            //    MessageBox.Show(str_maxlen);
            //            //}
            //            page1 = str_maxlen.Substring(0, 50);          //1行
            //            page2 = str_maxlen.Substring(51, str_maxlen.Length-50);        //2行
            //        }
            //        if (str_maxlen.Length <= 150 && str_maxlen.Length > 100)
            //        {
            //            rownum = "3";
            //            page1 = str_maxlen.Substring(0, 50);          //1行
            //            page2 = str_maxlen.Substring(51, 50);        //2行
            //            //page3 = str_maxlen.Substring(101, str_maxlen.Length-100);       //3行
            //            page3 = str_maxlen.Substring(page2.Length, str_maxlen.Length - page2.Length); 
            //        }
            //        if (str_maxlen.Length <= 200 && str_maxlen.Length > 150)
            //        {
            //            rownum = "4";
            //            page1 = str_maxlen.Substring(0, 50);          //1行
            //            page2 = str_maxlen.Substring(51, 50);        //2行
            //            page3 = str_maxlen.Substring(101, 50);       //3行
            //            page4 = str_maxlen.Substring(151, str_maxlen.Length-150);       //4行
            //        }
            //        if (str_maxlen.Length <= 250 && str_maxlen.Length > 200)
            //        {
            //            rownum = "5";
            //            page1 = str_maxlen.Substring(0, 50);          //1行
            //            page2 = str_maxlen.Substring(51, 50);        //2行
            //            page3 = str_maxlen.Substring(101, 50);       //3行
            //            page4 = str_maxlen.Substring(151, 50);       //4行
            //            page5 = str_maxlen.Substring(201, str_maxlen.Length-200);       //5行
            //        }
            //        if (str_maxlen.Length <= 300 && str_maxlen.Length > 250)
            //        {
            //            rownum = "6";
            //            page1 = str_maxlen.Substring(0, 50);          //1行
            //            page2 = str_maxlen.Substring(51, 50);        //2行
            //            page3 = str_maxlen.Substring(101, 50);       //3行
            //            page4 = str_maxlen.Substring(151, 50);       //4行
            //            page5 = str_maxlen.Substring(201, 50);       //5行
            //            page6 = str_maxlen.Substring(251, str_maxlen.Length-250);       //6行
            //        }
            //        if (str_maxlen.Length <= 350 && str_maxlen.Length > 300)
            //        {
            //            rownum = "7";
            //            page1 = str_maxlen.Substring(0, 50);          //1行
            //            page2 = str_maxlen.Substring(51, 50);        //2行
            //            page3 = str_maxlen.Substring(101, 50);       //3行
            //            page4 = str_maxlen.Substring(151, 50);       //4行
            //            page5 = str_maxlen.Substring(201, 50);       //5行
            //            page6 = str_maxlen.Substring(251, 50);       //6行
            //            page7 = str_maxlen.Substring(301, str_maxlen.Length-301);       //7行
            //        }
            //        if (str_maxlen.Length <= 400 && str_maxlen.Length > 350)
            //        {
            //            rownum = "8";
            //            page1 = str_maxlen.Substring(0, 50);          //1行
            //            page2 = str_maxlen.Substring(51, 50);        //2行
            //            page3 = str_maxlen.Substring(101, 50);       //3行
            //            page4 = str_maxlen.Substring(151, 50);       //4行
            //            page5 = str_maxlen.Substring(201, 50);       //5行
            //            page6 = str_maxlen.Substring(251, 50);       //6行
            //            page7 = str_maxlen.Substring(301, 50);       //7行
            //            page8 = str_maxlen.Substring(351, str_maxlen.Length-350);       //8行
            //        }
            //        if (str_maxlen.Length <= 450 && str_maxlen.Length > 400)
            //        {
            //            rownum = "9";
            //            page1 = str_maxlen.Substring(0, 50);          //1行
            //            page2 = str_maxlen.Substring(51, 50);        //2行
            //            page3 = str_maxlen.Substring(101, 50);       //3行
            //            page4 = str_maxlen.Substring(151, 50);       //4行
            //            page5 = str_maxlen.Substring(201, 50);       //5行
            //            page6 = str_maxlen.Substring(251, 50);       //6行
            //            page7 = str_maxlen.Substring(301, 50);       //7行
            //            page8 = str_maxlen.Substring(351, 50);       //8行
            //            page9 = str_maxlen.Substring(401, str_maxlen.Length-400);       //9行
            //        }
            //        if (str_maxlen.Length <= 500 && str_maxlen.Length > 450)
            //        {
            //            rownum = "10";
            //            page1 = str_maxlen.Substring(0, 50);          //1行
            //            page2 = str_maxlen.Substring(51, 50);        //2行
            //            page3 = str_maxlen.Substring(101, 50);       //3行
            //            page4 = str_maxlen.Substring(151, 50);       //4行
            //            page5 = str_maxlen.Substring(201, 50);       //5行
            //            page6 = str_maxlen.Substring(251, 50);       //6行
            //            page7 = str_maxlen.Substring(301, 50);       //7行
            //            page8 = str_maxlen.Substring(351, 50);       //8行
            //            page9 = str_maxlen.Substring(401, 50);       //9行
            //            page10 = str_maxlen.Substring(451, str_maxlen.Length-450);       //10行
            //        }
            //    }
            //}
            //catch (Exception ex)
            //{
            //    pw.StopThread();
            //    MessageBox.Show(ex.ToString());
            //    return;
            //}
            #endregion
            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            LocalReport report = new LocalReport();
            report.SubreportProcessing += new SubreportProcessingEventHandler(report_SubreportProcessing);
            report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_zyjc_main.rdlc";
            report.EnableExternalImages = true;
            DateTime dqrq = xtbiz.GetDataNow();

            ReportParameter rp1 = new ReportParameter("dwmc", txtDw.Text.Trim());
            ReportParameter rp2 = new ReportParameter("tjrq", tjrq);
            ReportParameter rp3 = new ReportParameter("bgrqdx", tzs.ChangeTime(dqrq));
            ReportParameter rp4 = new ReportParameter("gzjwhys", gzjwhys.ToString());
            ReportParameter rp5 = new ReportParameter("ys", txtYs.Text.Trim());
            ReportParameter rp6 = new ReportParameter("rownum", "0");    //行数,确定使用哪个子报表
            ReportParameter rp7 = new ReportParameter("page1", richTextBox1.Text.Trim());      //每行对应的内容
            ReportParameter rp8 = new ReportParameter("page2", page2);
            ReportParameter rp9 = new ReportParameter("page3", page3);
            ReportParameter rp10 = new ReportParameter("page4", page4);
            ReportParameter rp11 = new ReportParameter("page5", page5);
            ReportParameter rp12 = new ReportParameter("page6", page6);
            ReportParameter rp13 = new ReportParameter("page7", page7);
            ReportParameter rp14 = new ReportParameter("page8", page8);
            ReportParameter rp15 = new ReportParameter("page9", page9);
            ReportParameter rp16 = new ReportParameter("page10", page10);

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4,rp5,rp6,rp7,rp8,rp9,rp10,rp11,rp12,rp13,rp14,rp15,rp16});
          
            //打印
            RdlcPrintNew rdlcprint = new RdlcPrintNew();
            rdlcprint.Hxdy = true;
            rdlcprint.Run(report, "体检通知书", false, "tjjgdy");
           
            pw.StopThread();
        }
Ejemplo n.º 19
0
        /// <summary>
        /// 打印健康档案
        /// </summary>
        /// <param name="tjbh">体检编号</param>
        /// <param name="tjcs">体检次数</param>
        /// <param name="djlsh">登记流水号</param>
        /// <param name="pagefw">打印页码范围,""表示所有</param>
        public void PrintJkda(string tjbh, string tjcs, string djlsh, string pagefw)
        {
            BarcodeControl barcode = new BarcodeControl();

            barcode.BarcodeType = BarcodeType.CODE128C;
            barcode.Data        = djlsh;
            barcode.CopyRight   = "";
            MemoryStream stream = new MemoryStream();

            barcode.MakeImage(ImageFormat.Png, 1, 50, true, false, null, stream);
            Bitmap myimge = new Bitmap(stream);

            string str_path = Application.StartupPath + @"/barcode.png";

            myimge.Save(str_path, ImageFormat.Png);
            str_path = "file:///" + str_path;
            myimge.Dispose();              //201203

            str_dwlxr   = xtBiz.GetXtCsz("dwlxr").Trim();
            str_dwdz    = xtBiz.GetXtCsz("dwdz").Trim();
            str_dwdh    = xtBiz.GetXtCsz("TjDwDh").Trim();
            str_tjzgzbh = xtBiz.GetXtCsz("zytjzgbh").Trim();//职业健康体检资格编号

            //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

            //this.strTjbh = tjbh;
            //this.strTjcs = tjcs;
            //LocalReport report = new LocalReport();
            //report.SubreportProcessing += new SubreportProcessingEventHandler(report_SubreportProcessing);
            //string title = "职业健康检查表";

            //DataTable dt2 = GetZybRyxx(tjbh, tjcs);

            //report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_zyb_jkda_new.rdlc";
            //report.EnableExternalImages = true;
            //ReportParameter rp1 = new ReportParameter("dqrq", xtBiz.GetDataNow().ToString("yyyy-MM-dd"));
            //ReportParameter rp2 = new ReportParameter("title", title);
            //ReportParameter rp3 = new ReportParameter("bbmc", Program.reg_dwmc);
            //ReportParameter rp4 = new ReportParameter("barcode", str_path);
            //ReportParameter rp5 = new ReportParameter("dz", str_dwdz);
            //ReportParameter rp6 = new ReportParameter("dh", str_dwdh);
            //ReportParameter rp7 = new ReportParameter("lxr", str_dwlxr);
            //ReportParameter rp8 = new ReportParameter("zgbh", str_tjzgzbh);


            //report.DataSources.Clear();
            //report.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 });
            ////report.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4,rp8 });
            //report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_zyb_ryxx", dt2));

            //RdlcPrintNew rdlcprint = new RdlcPrintNew();
            //rdlcprint.Run(report, "职业健康检查表打印", false, "A4", pagefw);
            //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

            this.strTjbh = tjbh;
            this.strTjcs = tjcs;
            LocalReport report = new LocalReport();

            report.SubreportProcessing += new SubreportProcessingEventHandler(report_SubreportProcessing);
            string title = xtBiz.GetXtCsz("TjDwMc");

            DataTable dt2 = GetZybRyxx(tjbh, tjcs);

            report.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_zyb_jkda_new.rdlc";
            report.EnableExternalImages = true;
            ReportParameter rp1 = new ReportParameter("dqrq", xtBiz.GetDataNow().ToString("yyyy-MM-dd"));
            ReportParameter rp2 = new ReportParameter("title", title);
            ReportParameter rp3 = new ReportParameter("bbmc", Program.reg_dwmc);
            ReportParameter rp4 = new ReportParameter("barcode", str_path);
            ReportParameter rp5 = new ReportParameter("dz", str_dwdz);
            ReportParameter rp6 = new ReportParameter("dh", str_dwdh);
            ReportParameter rp7 = new ReportParameter("lxr", str_dwlxr);
            ReportParameter rp8 = new ReportParameter("zgbh", str_tjzgzbh);


            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 });
            //report.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4,rp8 });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_zyb_ryxx", dt2));

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.Run(report, "职业健康检查表打印", false, "A4", pagefw);
        }
Ejemplo n.º 20
0
        void PrintRdlc(string tjbh, string tjcs, string djlsh)
        {
            BarcodeControl barcode = new BarcodeControl();

            barcode.BarcodeType = BarcodeType.CODE128A; //CODE128C
            barcode.Data        = tjbh;                 //djlsh流水号变编号tjbh
            barcode.CopyRight   = "";
            MemoryStream stream = new MemoryStream();

            barcode.MakeImage(ImageFormat.Png, 1, 50, true, false, null, stream);
            Bitmap myimge = new Bitmap(stream);

            string str_path = Application.StartupPath + @"/barcode.png";

            myimge.Save(str_path, ImageFormat.Png);
            str_path = "file:///" + str_path;
            myimge.Dispose();              //201203
            string strLog = "file:///" + Application.StartupPath + @"/Img/log.jpg";

            //DataTable dt1 = rdlcbiz.Get_tj_tjjlb(tjbh, tjcs);
            DataTable dt2 = rdlcbiz.Get_v_tj_tjdjb(tjbh, tjcs);
            DataTable dt3 = rdlcbiz.Get_v_tj_fyxx(tjbh, tjcs);
            DataTable dt1 = rdlcbiz.Get_tj_tjjlb_ks(tjbh, tjcs);

            LocalReport report = new LocalReport();

            if (xtbiz.GetXtCsz("version").Trim() == "1") //职业体检
            {
                report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjzyd_zyb.rdlc";
            }
            else
            {
                ///report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjzyd.rdlc";
                report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjzyd_zyb_0120.rdlc";
            }
            report.EnableExternalImages = true;
            ReportParameter rp1 = new ReportParameter("tjdw", Program.reg_dwmc);
            ReportParameter rp2 = new ReportParameter("barcode", str_path);
            ReportParameter rp3 = new ReportParameter("tjdh", str_dwdh);
            ReportParameter rp4 = new ReportParameter("log", strLog);
            ReportParameter rp5 = new ReportParameter("dwcz", str_dwczhm);
            ReportParameter rp6 = new ReportParameter("dwlxr", str_dwlxr);
            ReportParameter rp7 = new ReportParameter("version", str_version);
            ReportParameter rp8 = new ReportParameter("dwdz", str_dwdz);

            report.DataSources.Clear();
            report.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 });
            report.DataSources.Add(new ReportDataSource("PEISDataSet_tj_tjjlb", dt1));
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_fyxx", dt3));

            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            rdlcprint.PrinterName = cboxPrinter.SelectedItem.ToString();
            rdlcprint.Page_x      = Convert.ToInt32(tb_zyd_x.Text);
            rdlcprint.Page_y      = Convert.ToInt32(tb_zyd_y.Text);
            //rdlcprint.PageWidth = tb_zyd_w.Text;
            //rdlcprint.PageHeight = tb_zyd_h.Text;
            rdlcprint.Page_scale = (float)numericUpDown_scale.Value;
            rdlcprint.Hxdy       = cb_heng.Checked;
            rdlcprint.Run(report, "体检指引单打印", false, "A4");
        }
Ejemplo n.º 21
0
        public void PrintRdlc(string tjbh, string tjcs, string djlsh, string pagefw, string bggs)
        {
            str_tjbh  = tjbh;
            str_tjcs  = tjcs;
            str_djlsh = djlsh;

            if (bggs == "")
            {
                bggs = "标准格式";
            }

            BarcodeControl barcode = new BarcodeControl();

            barcode.BarcodeType = BarcodeType.CODE128C;
            barcode.Data        = str_djlsh;
            barcode.CopyRight   = "";
            MemoryStream stream = new MemoryStream();

            barcode.MakeImage(ImageFormat.Png, 1, 50, true, false, null, stream);
            Bitmap myimge = new Bitmap(stream);

            string str_picpath  = Application.StartupPath + @"/Img/医院徽标.bmp";
            string str_barpath  = Application.StartupPath + @"/barcode.png";
            string str_ZYBG_Top = Application.StartupPath + @"/Img/ZYBG_Top.png";
            string str_yyewm    = Application.StartupPath + @"/Img/微信.png";

            myimge.Save(str_barpath, ImageFormat.Png);
            str_picpath  = "file:///" + str_picpath;
            str_barpath  = "file:///" + str_barpath;
            str_ZYBG_Top = "file:///" + str_ZYBG_Top;
            str_yyewm    = "file:///" + str_yyewm;//微信二维码

            DataTable    dt2       = rdlcbiz.Get_v_tj_tjdjb(str_tjbh, str_tjcs);
            LocalReport  report    = new LocalReport();
            RdlcPrintNew rdlcprint = new RdlcPrintNew();

            string str_tjlb = dt2.Rows[0]["lbbh"].ToString();//中医体检 2014-06-26

            if (str_tjlb == "05")
            {
                DataTable  dt      = tjjgbiz.Get_v_tj_zyjgb(str_tjbh, str_tjcs);
                byte[]     bytes   = PEIS.Properties.Resources.Report_tjbg_zytj;
                FileStream fstream = File.Create(@"C:\WINDOWS\Temp\Report_tjbg_temp", bytes.Length);
                try
                {
                    fstream.Write(bytes, 0, bytes.Length);   //二进制转换成文件
                }
                catch (Exception ex)
                {
                    //抛出异常信息
                    MessageBox.Show("报表文件处理异常,请联系技术支持人员!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                finally
                {
                    fstream.Close();
                }
                File.Copy(@"C:\WINDOWS\Temp\Report_tjbg_temp", @"C:\WINDOWS\Temp\Report_tjbg_zytj", true);
                report.ReportPath = @"C:\WINDOWS\Temp\Report_tjbg_zytj";

                //report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg_zytj.rdlc";
                report.DisplayName          = "蒙藏医体质识别报告";
                report.EnableExternalImages = true;
                report.DataSources.Clear();
                ReportParameter rp     = new ReportParameter("dwmc", Program.reg_dwmc);
                ReportParameter rp_top = new ReportParameter("ZYBG_Top", str_ZYBG_Top);
                report.SetParameters(new ReportParameter[] { rp, rp_top });
                report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_zyjgb", dt));

                rdlcprint.Run(report, "蒙藏医体质识别报告", false, "A4", pagefw);
                tjjgbiz.Update_tj_tjdjb_Dycs(str_tjbh, str_tjcs);//修改打印次数
                return;
            }

            report.SubreportProcessing += new SubreportProcessingEventHandler(report_SubreportProcessing);

            if (bggs == "明细结果格式")
            {
                report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg_jgjcb.rdlc";
            }
            else if (bggs == "结论格式")
            {
                report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg_zsbg.rdlc";
            }
            else//标准格式
                // report.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg.rdlc";
            {
                report.ReportPath = Application.StartupPath + @"/rdlc/Report_tjbg_zs_贺州.rdlc";
            }
            report.EnableExternalImages = true;
            ReportParameter rp1 = new ReportParameter("tjdw", Program.reg_dwmc);
            ReportParameter rp2 = new ReportParameter("barcode", str_barpath);
            ReportParameter rp3 = new ReportParameter("tjdh", str_dwdh);
            ReportParameter rp4 = new ReportParameter("yypic", str_picpath);
            ReportParameter rp5 = new ReportParameter("yyewm", str_yyewm);

            report.DataSources.Clear();
            //report.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4,rp5 });//改变格式
            report.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));

            rdlcprint.PrinterName = cboxPrinter.SelectedItem.ToString();
            //rdlcprint.Run(report, "体检报告打印", false, "A4",pagefw);
            rdlcprint.Run(report, "体检报告打印", false, "A4");
            tjjgbiz.Update_tj_tjdjb_Dycs(str_tjbh, str_tjcs);//修改打印次数
        }