zoukankan      html  css  js  c++  java
  • dbgrideh通用打印

    {*******************************************************}
    {                                                       }
    {       通用打印模块                                    }   
    {                                                       }
    {       版权所有 (C) 2008 咏南工作室(陈新光)          }
    {                                                       }
    {*******************************************************}

    unit uPrint;

    interface

    uses
      DBGridEh,PrnDbgeh,SysUtils,Graphics,Forms,Printers,windows;

    procedure Prnt(AGrid:TDBGridEh;AOwner:Tform;APageHeader:string='';
      ALineType:TPageColontitleLineType=pcltnon);

    implementation

    //==============================================================================
    // linetype取值{pcltDoubleLine;pcltsingleline;pcltnon}
    // AOwner:TForm TPrintDBGridEh.Create(AOwner); 负责TPrintDBGridEh类对象FREE
    // TPrinterOrientation = (poPortrait, poLandscape); 纸张竖、横
    //==============================================================================

    procedure Prnt(AGrid:TDBGridEh;AOwner:TForm;APageHeader:string='';
      ALineType:TPageColontitleLineType=pcltnon);
    var
      prn:TPrintDBGridEh;
    begin
      if AGrid.DataSource.DataSet.IsEmpty then exit;
      prn:=TPrintDBGridEh.Create(AOwner);
      with prn.PageHeader do
      begin
        Font.Name:='宋体';
        Font.Size:=12;
        Font.Style:=[fsbold];
        LineType:=ALineType;
        CenterText.Text:=APageHeader;
      end;
      prn.DBGridEh:=AGrid;
      prn.Preview;
    end;

    end.
     

  • 相关阅读:
    图论 拓扑排序
    图论 k短路
    图论 最短路 spfa
    12.14 操作系统实验:linux虚拟机与进程管理
    Anaconda 换用清华园后安装速度依然很慢,或者安装包出错
    6.21 在panel中设置背景并不覆盖控件--paintComponent
    1.15 关于String类型和其他主数据类型相互转换的方法 (转)
    1.14 Headfirstjava第五章 简单游戏代码
    1.14 HeadFirstJava 前六章读书笔记总结
    1.22训练赛 --ac2
  • 原文地址:https://www.cnblogs.com/hnxxcxg/p/2940896.html
Copyright © 2011-2022 走看看