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.
     

  • 相关阅读:
    [状压dp][spfa] Jzoj P3737 挖宝藏
    [计算几何] Jzoj P3736 数学题
    [排序][vector] Jzoj P6288 旋转子段
    [区间dp] Jzoj P6287 扭动的树
    [bfs][spfa] Jzoj P6286 走格子
    [点分治] Luogu P2664 树上游戏
    [树链剖分][树状数组] Luogu P3676 小清新数据结构题
    [计算几何][dp] Luogu P1995 智能车比赛
    [后缀数组][并查集] Luogu P2178 品酒大会
    [莫比乌斯反演][整除分块] Bzoj P2301 Problem b
  • 原文地址:https://www.cnblogs.com/hnxxcxg/p/2940896.html
Copyright © 2011-2022 走看看