zoukankan      html  css  js  c++  java
  • 使用System.Drawing.Printing 画报表。

    Font titleFont = new Font("宋体", 18, FontStyle.Bold);//设置画笔
    Font font = new Font("宋体", 10, FontStyle.Regular);//设置画笔
    Brush bru = Brushes.Black;
    Pen line
    = new Pen(Color.Black, 1);//设置线条

    e.Graphics.DrawString(
    "北京惠兰医院自费收款日结单", titleFont, bru, 170, 20);
    e.Graphics.DrawLine(line,
    70, 60, 620, 60);
    e.Graphics.DrawLine(line,
    70, 350, 620, 350);
    e.Graphics.DrawLine(line,
    70, 60, 70, 410);
    e.Graphics.DrawLine(line,
    620, 60, 620, 410);
    //---------------------------------------------
    e.Graphics.DrawLine(line, 70, 90, 620, 90);
    e.Graphics.DrawLine(line,
    70, 120, 620, 120);
    //e.Graphics.DrawLine(line, 70, 150, 620, 150);
    e.Graphics.DrawLine(line, 70, 230, 620, 230);
    e.Graphics.DrawLine(line,
    70, 260, 620, 260); //直线
    e.Graphics.DrawLine(line, 70, 290, 620, 290);
    e.Graphics.DrawLine(line,
    70, 320, 620, 320);
    e.Graphics.DrawLine(line,
    70, 350, 620, 350);
    e.Graphics.DrawLine(line,
    70, 350, 620, 350);
    e.Graphics.DrawLine(line,
    70, 380, 620, 380);
    e.Graphics.DrawLine(line,
    70, 410, 620, 410);
    //---------------------------------------------
    e.Graphics.DrawLine(line, 130, 60, 130, 90);
    e.Graphics.DrawLine(line,
    320, 60, 320, 90);
    e.Graphics.DrawLine(line,
    420, 60, 420, 90);
    e.Graphics.DrawLine(line,
    170, 90, 170, 120);
    //e.Graphics.DrawLine(line, 170, 120, 170, 150);
    //e.Graphics.DrawLine(line, 120, 150, 120, 230);//竖线
    e.Graphics.DrawLine(line, 170, 230, 170, 410);
    //e.Graphics.DrawLine(line, 220, 230, 220, 320);
    e.Graphics.DrawLine(line, 320, 230, 320, 410);
    e.Graphics.DrawLine(line,
    420, 230, 420, 410);
    //--------------------------------------------
    e.Graphics.DrawString("收款员:", font, bru, 70, 70);
    e.Graphics.DrawString(
    "张三", font, bru, 140, 70);
    e.Graphics.DrawString(
    "收款日期:", font, bru, 340, 70);
    e.Graphics.DrawString(DateTime.Now.ToString(
    "yyyy年MM月dd日"), font, bru, 470, 70);
    e.Graphics.DrawString(
    "预交金收据号:", font, bru, 70, 100);
    e.Graphics.DrawString(
    "000000000001" + " - " + "000000000002", font, bru, 220, 100);
    e.Graphics.DrawString(
    "其中:", font, bru, 80, 180);
    e.Graphics.DrawString(
    "实际收入:", font, bru, 70, 240);
    e.Graphics.DrawString(
    "3000", font, bru, 230, 240);
    e.Graphics.DrawString(
    "大写:", font, bru, 350, 240);
    e.Graphics.DrawString(
    "叁仟圆整", font, bru, 440, 240);
    e.Graphics.DrawString(
    "收费总额:", font, bru, 70, 270);
    e.Graphics.DrawString(
    "5000", font, bru, 230, 270);
    e.Graphics.DrawString(
    "大写:", font, bru, 350, 270);
    e.Graphics.DrawString(
    "伍仟圆整", font, bru, 440, 270);
    e.Graphics.DrawString(
    "退费总额:", font, bru, 70, 300);
    e.Graphics.DrawString(
    "2000", font, bru, 230, 300);
    e.Graphics.DrawString(
    "大写:", font, bru, 350, 300);
    e.Graphics.DrawString(
    "两仟圆整", font, bru, 440, 300);
    e.Graphics.DrawString(
    "现金:", font, bru, 70, 330);
    e.Graphics.DrawString(
    "3000", font, bru, 230, 330);
    e.Graphics.DrawString(
    "银行卡:", font, bru, 350, 330);
    e.Graphics.DrawString(
    "0", font, bru, 440, 330);
    e.Graphics.DrawString(
    "支票:", font, bru, 70, 360);
    e.Graphics.DrawString(
    "0", font, bru, 230, 360);
    e.Graphics.DrawString(
    "汇票:", font, bru, 350, 360);
    e.Graphics.DrawString(
    "0", font, bru, 440, 360);
    e.Graphics.DrawString(
    "记账:", font, bru, 70, 390);
    e.Graphics.DrawString(
    "0", font, bru, 230, 390);

    e.Graphics.DrawString(
    "制表人:", font, bru, 70, 420);
    e.Graphics.DrawString(
    "审核人:", font, bru, 240, 420);
    e.Graphics.DrawString(
    "复核人:", font, bru, 500, 420);

  • 相关阅读:
    【整理学习Hadoop】Hadoop学习基础之一:服务器集群技术
    淘宝开源平台(taobao-code)使用
    【转载】Java定时器的学习
    DHTMLTree、Dtree和Ztree的学习使用
    iBatis 简单介绍及基础入门
    【转载】Spring介绍之二
    透明度标签、html透明度
    下拉列表禁止修改
    list删除、集合遍历删除
    表格样式、表格css、
  • 原文地址:https://www.cnblogs.com/junjie94wan/p/2130180.html
Copyright © 2011-2022 走看看