Example #1
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");
        }
Example #2
0
        private void reportView_Load(object sender, EventArgs e)
        {
            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_path = Application.StartupPath + @"/barcode.png";

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

            string str_dwlxr   = xtBiz.GetXtCsz("dwlxr").Trim();    //单位联系人
            string str_dwdz    = xtBiz.GetXtCsz("dwdz").Trim();     //单位地址
            string str_dwdh    = xtBiz.GetXtCsz("TjDwDh").Trim();   //体检单位电话
            string str_tjzgzbh = xtBiz.GetXtCsz("zytjzgbh").Trim(); //职业健康体检资格编号



            //string str_dwlxr = "hh";//单位联系人
            //string str_dwdz = "hh";//单位地址
            //string str_dwdh = "hh";//体检单位电话
            //string str_tjzgzbh = "hh";//职业健康体检资格编号

            //LocalReport report = new LocalReport();
            reportView.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(report_SubreportProcessing);
            string title = "职业健康检查表";

            DataTable dt2 = GetZybRyxx(strTjbh, strTjcs);

            reportView.LocalReport.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_zyb_jkda_new.rdlc";
            reportView.LocalReport.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);

            reportView.LocalReport.DataSources.Clear();
            reportView.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 });

            //reportView.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4 });
            reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_zyb_ryxx", dt2));
            this.reportView.RefreshReport();
        }
Example #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, 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");
        }
Example #4
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");
        }
Example #5
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");
        }
Example #6
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);//修改打印次数
        }
Example #7
0
        private void Form_report_Load(object sender, EventArgs e)
        {
            str_tjdw = xtbiz.GetXtCsz("TjDwMc");
            str_dwdh = xtbiz.GetXtCsz("TjDwDh");
            sqd_ts   = xtbiz.GetXtCsz("sqd_ts");

            BarcodeControl barcode = new BarcodeControl();

            barcode.BarcodeType = BarcodeType.CODE128A; //CODE128C
            barcode.Data        = str_tjbh;             //流水号改编号 by zhz
            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;
            string strLog = "file:///" + Application.StartupPath + @"/Img/log.jpg";

            str_yyewm = "file:///" + str_yyewm;//微信二维码

            if (str_type == "tjzyd")
            {
                string str_dwlxr   = ""; //联系人
                string str_dwczhm  = ""; //传真
                string str_version = ""; //版本
                string str_dwdz    = ""; //地址
                str_dwczhm  = xtbiz.GetXtCsz("dwczdh").Trim();
                str_dwlxr   = xtbiz.GetXtCsz("dwlxr").Trim();
                str_dwdz    = xtbiz.GetXtCsz("dwdz").Trim();
                str_version = xtbiz.GetXtCsz("version").Trim();

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

                if (xtbiz.GetXtCsz("version").Trim() == "1") //职业

                {
                    reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjzyd_zyb.rdlc";
                }
                else
                {
                    //reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjzyd.rdlc";
                    reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjzyd_zyb_0120.rdlc";//by zhz 0121
                }
                reportView.LocalReport.EnableExternalImages = true;
                ReportParameter rp1 = new ReportParameter("tjdw", str_tjdw);
                ReportParameter rp2 = new ReportParameter("barcode", str_barpath);
                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);
                reportView.LocalReport.DataSources.Clear();
                reportView.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 });
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_tj_tjjlb", dt1));// by zhz
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_fyxx", dt3));
            }
            if (str_type == "tjsqd")
            {
                DataTable dt1 = rdlcbiz.Get_tj_sqdlx_hd(str_tjbh, str_tjcs);
                DataTable dt2 = rdlcbiz.Get_v_tj_tjdjb(str_tjbh, str_tjcs);
                reportView.LocalReport.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_tjsqd.rdlc";
                reportView.LocalReport.EnableExternalImages = true;
                ReportParameter rp1 = new ReportParameter("tjdw", str_tjdw);
                ReportParameter rp2 = new ReportParameter("barcode", str_barpath);
                ReportParameter rp3 = new ReportParameter("sqd_ts", sqd_ts);
                reportView.LocalReport.DataSources.Clear();
                reportView.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_tj_sqdlx_hd", dt1));
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));
            }
            if (str_type == "tjtxm")
            {
                DataTable dt2 = rdlcbiz.Get_v_tj_tjdjb(str_tjbh, str_tjcs);
                reportView.LocalReport.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_tjtxm.rdlc";
                reportView.LocalReport.EnableExternalImages = true;
                ReportParameter rp1 = new ReportParameter("barcode", str_barpath);
                reportView.LocalReport.DataSources.Clear();
                reportView.LocalReport.SetParameters(new ReportParameter[] { rp1 });
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));
            }
            if (str_type == "tjbg")
            {
                DataTable dt2 = rdlcbiz.Get_v_tj_tjdjb(str_tjbh, str_tjcs);

                string str_tjlb = dt2.Rows[0]["lbbh"].ToString();
                if (str_tjlb == "05")//中医体检 2014-06-26
                {
                    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);
                    reportView.LocalReport.ReportPath = @"C:\WINDOWS\Temp\Report_tjbg_zytj";
                    //reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg_zytj.rdlc";
                    reportView.LocalReport.EnableExternalImages = true;
                    reportView.LocalReport.DataSources.Clear();
                    ReportParameter rp     = new ReportParameter("dwmc", Program.reg_dwmc);
                    ReportParameter rp_top = new ReportParameter("ZYBG_Top", str_ZYBG_Top);
                    reportView.LocalReport.SetParameters(new ReportParameter[] { rp, rp_top });
                    reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_zyjgb", dt));
                    this.reportView.RefreshReport();
                    return;
                }

                reportView.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing);

                if (str_bggs == "明细结果格式")
                {
                    reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg_jgjcb.rdlc";
                }
                else if (str_bggs == "结论格式")
                {
                    reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg_zsbg.rdlc";
                }
                else//标准格式
                    //reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg.rdlc";
                {
                    reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlc/Report_tjbg_zs_贺州.rdlc";
                }

                reportView.LocalReport.EnableExternalImages = true;
                ReportParameter rp1 = new ReportParameter("tjdw", str_tjdw);
                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);
                reportView.LocalReport.DataSources.Clear();
                //reportView.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3,rp4,rp5 });
                //reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_tj_tjjlb", dt1));
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));
            }
            this.reportView.RefreshReport();
        }
Example #8
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);
        }