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.
     

  • 相关阅读:
    PAT(乙级)2020年冬季考试
    Educational Codeforces Round 105 (Rated for Div. 2)【ABC】
    三省吾身
    初识SpringBoot
    Controller 层中,到底是 返回界面 还是JSON?(转)
    IDEA控制台中文乱码解决
    springboot引入外部依赖jar包(转)
    Java7的try-with-resources声明(转)
    Java对象的序列化和反序列化(转)
    AcWing1303. 斐波那契前 n 项和(递推/矩阵快速幂)
  • 原文地址:https://www.cnblogs.com/hnxxcxg/p/2940896.html
Copyright © 2011-2022 走看看