亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? reportcontrol.pas

?? 國產(chǎn)的報(bào)表控件
?? PAS
?? 第 1 頁 / 共 5 頁
字號:
{************************************
*  表格式報(bào)表處理系統(tǒng) of  DELPHI    *
*  China Report system of DELPHI    *
*  簡稱:CReport V3.0               *
*  原創(chuàng):郭家駿、王寒松             *
*  修改:廖伯志                     *
*  修改:趙慧誠,本人水平有限(大部   *
*  分看不懂),只能增加行號和子行號;*
*  LineNum行號,SubLineNum子行號(每個(gè)*
*  子表行號)                        *
*  最后修改日期:1999.11.22         *
*************************************}
unit ReportControl;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls,
  Forms, Dialogs, Math, Printers, Menus, Db, FileCtrl;

const
  // Horz Align
  TEXT_ALIGN_LEFT = 0;
  TEXT_ALIGN_CENTER = 1;
  TEXT_ALIGN_RIGHT = 2;

  // Vert Align
  TEXT_ALIGN_TOP = 0;
  TEXT_ALIGN_VCENTER = 1;
  TEXT_ALIGN_BOTTOM = 2;

  // 斜線定義
  LINE_LEFT1 = 1; // left top to right bottom
  LINE_LEFT2 = 2; // left top to right
  LINE_LEFT3 = 4; // left top to bottom

  LINE_RIGHT1 = $100; // right top to left bottom
  LINE_RIGHT2 = $200; // right top to left
  LINE_RIGHT3 = $400; // right top to bottom

type
  TReportCell = class;
  TReportLine = class;
  TReportControl = class;

  TReportCell = class(TObject)
  private
    { Private declarations }
    FLeftMargin: Integer; // 左邊的空格
    FOwnerLine: TReportLine; // 隸屬行
    FOwnerCell: TReportCell; // 隸屬的單元格
    FCellsList: TList; // 覆蓋的Cell

    // Index
    FCellIndex: Integer; // Cell在行中的索引

    // size & position
    FCellLeft: Integer;
    FCellWidth: Integer;

    FCellRect: TRect; // 計(jì)算得來
    FTextRect: TRect;

    FDragCellHeight: Integer;
    FMinCellHeight: Integer;
    FRequiredCellHeight: Integer;

    // Cell的Top屬性從隸屬的行中取得
    // int GetCellTop();
    // Cell的Height屬性從隸屬行和跨越行中取得
    // int GetCellHeight();

    // border
    FLeftLine: Boolean;
    FLeftLineWidth: Integer;

    FTopLine: Boolean;
    FTopLineWidth: Integer;

    FRightLine: Boolean;
    FRightLineWidth: Integer;

    FBottomLine: Boolean;
    FBottomLineWidth: Integer;

    // 斜線
    FDiagonal: UINT;

    // color
    FTextColor: COLORREF;
    FBackGroundColor: COLORREF;

    // align
    FHorzAlign: Integer;
    FVertAlign: Integer;

    // string
    FCellText: string;

    // font
    FLogFont: TLOGFONT;
    function GetCellHeight: Integer;
    function GetCellTop: Integer;
    function GetOwnerLineHeight: Integer;
  protected
    { Protected declarations }
    procedure SetLeftMargin(LeftMargin: Integer);
    procedure SetOwnerLine(OwnerLine: TReportLine);

    procedure SetOwnerCell(Cell: TReportCell);
    function GetOwnedCellCount: Integer;

    procedure SetCellLeft(CellLeft: Integer);
    procedure SetCellWidth(CellWidth: Integer);

    procedure SetLeftLine(LeftLine: Boolean);
    procedure SetLeftLineWidth(LeftLineWidth: Integer);

    procedure SetTopLine(TopLine: Boolean);
    procedure SetTopLineWidth(TopLineWidth: Integer);

    procedure SetRightLine(RightLine: Boolean);
    procedure SetRightLineWidth(RightLineWidth: Integer);

    procedure SetBottomLine(BottomLine: Boolean);
    procedure SetBottomLineWidth(BottomLineWidth: Integer);

    procedure SetCellText(CellText: string);
    procedure SetLogFont(NewFont: TLOGFONT);

    procedure SetBackGroundColor(BkColor: COLORREF);
    procedure SetTextColor(TextColor: COLORREF);

  public
    { Public declarations }
    procedure AddOwnedCell(Cell: TReportCell);
    procedure RemoveAllOwnedCell;
    procedure RemoveOwnedCell(Cell: TReportCell);
    function IsCellOwned(Cell: TReportCell): Boolean;
    procedure CalcCellRect;
    procedure CalcMinCellHeight;
    procedure PaintCell(hPaintDC: HDC; bPrint: Boolean);
    procedure CopyCell(Cell: TReportCell; bInsert: Boolean);
    constructor Create;
    destructor Destroy; override;

    // Properties
    property LeftMargin: Integer read FLeftMargin write SetLeftMargin;
    property OwnerLine: TReportLine read FOwnerLine write SetOwnerLine;
    property OwnerCell: TReportCell read FOwnerCell write SetOwnerCell;
    property OwnedCellCount: Integer read GetOwnedCellCount;

    property CellIndex: Integer read FCellIndex write FCellIndex;

    // size & position
    property CellLeft: Integer read FCellLeft write SetCellLeft;
    property CellWidth: Integer read FCellWidth write SetCellWidth;
    property CellTop: Integer read GetCellTop;
    property CellHeight: Integer read GetCellHeight;

    property CellRect: TRect read FCellRect;
    property TextRect: TRect read FTextRect;

    property DragCellHeight: Integer read FDragCellHeight;
    // or protected property ?
    property MinCellHeight: Integer read FMinCellHeight write FMinCellHeight;
    property RequiredCellHeight: Integer read FRequiredCellHeight;
    property OwnerLineHeight: Integer read GetOwnerLineHeight;

    // border
    property LeftLine: Boolean read FLeftLine write SetLeftLine default True;
    property LeftLineWidth: Integer read FLeftLineWidth write SetLeftLineWidth default 1;

    property TopLine: Boolean read FTopLine write SetTopLine default True;
    property TopLineWidth: Integer read FTopLineWidth write SetTopLineWidth default 1;

    property RightLine: Boolean read FRightLine write SetRightLine default True;
    property RightLineWidth: Integer read FRightLineWidth write SetRightLineWidth default 1;

    property BottomLine: Boolean read FBottomLine write SetBottomLine default True;
    property BottomLineWidth: Integer read FBottomLineWidth write SetBottomLineWidth default 1;

    // 斜線
    property Diagonal: UINT read FDiagonal write FDiagonal;

    // color
    property TextColor: COLORREF read FTextColor write SetTextColor default clBlack;
    property BkColor: COLORREF read FBackGroundColor write SetBackGroundColor default clWhite;

    // align
    property HorzAlign: Integer read FHorzAlign write FHorzAlign default 1;
    property VertAlign: Integer read FVertAlign write FVertAlign default 1;

    // string
    property CellText: string read FCellText write SetCellText;

    // font
    property LogFont: TLOGFONT read FLogFont write SetLogFont;
  end;

  TReportLine = class(TObject)
  private
    { Private declarations }
    FReportControl: TReportControl; // Report Control的指針
    FCells: TList; // 保存所有在該行中的CELL
    FIndex: Integer; // 行的索引

    FMinHeight: Integer;
    FDragHeight: Integer;
    FLineTop: Integer;
    FLineRect: TRect;
    function GetLineHeight: Integer;
    function GetLineRect: TRect;
    procedure SetDragHeight(const Value: Integer);
    procedure SetLineTop(const Value: Integer);
  protected
    { Protected declarations }
  public
    { Public declarations }
    property ReportControl: TReportControl read FReportControl write FReportControl;
    property Index: Integer read FIndex write FIndex;
    property LineHeight: Integer read GetLineHeight write SetDragHeight;
    property LineTop: Integer read FLineTop write SetLineTop;
    property LineRect: TRect read GetLineRect;
    property PrevLineRect: TRect read FLineRect;

    procedure CalcLineHeight;
    procedure CreateLine(LineLeft, CellNumber, PageWidth: Integer);
    procedure CopyLine(Line: TReportLine; bInsert: Boolean);

    constructor Create;
    destructor Destroy; override;
  end;

  TReportControl = class(TWinControl)
  private
    { Private declarations }
    FPreviewStatus: Boolean;

    FLineList: TList;
    FSelectCells: TList;
    FEditCell: TReportCell;

    FReportScale: Integer;
    FPageWidth: Integer;
    FPageHeight: Integer;

    FLeftMargin: Integer;
    FRightMargin: Integer;
    FTopMargin: Integer;
    FBottomMargin: Integer;

    FcellFont: TlogFont;
    FcellFont_d: TlogFont;
    FLeftMargin1: Integer;
    FRightMargin1: Integer;
    FTopMargin1: Integer;
    FBottomMargin1: Integer;

    // 換頁加表頭(不加表頭)
    FNewTable: Boolean;

    // 定義打印多少行后從新加表頭
    FDataLine: Integer;
    FTablePerPage: Integer;

    // 鼠標(biāo)操作支持
    FMousePoint: TPoint;

    // 編輯、顏色及字體
    FEditWnd: HWND;
    FEditBrush: HBRUSH;
    FEditFont: HFONT;

    //    FReportMenu : TPopupMenu;
  protected
    { Protected declarations }
    procedure CreateWnd; override;
  public
    { Public declarations }
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    procedure SaveToFile(FileName: string);
    procedure LoadFromFile(FileName: string);
    procedure PrintIt;
    procedure ResetContent;
    procedure SetScale(const Value: Integer);

    property cellFont: TlogFont read Fcellfont write Fcellfont; //default true;
    property cellFont_d: TlogFont read Fcellfont_d write Fcellfont_d; //default true;

    // Message Handler
    procedure WMLButtonDown(var Message: TMessage); message WM_LBUTTONDOWN;
    procedure WMLButtonDBLClk(var Message: TMessage); message WM_LBUTTONDBLCLK;
    procedure WMMouseMove(var Message: TMessage); message WM_MOUSEMOVE;
    procedure WMContextMenu(var Message: TMessage); message WM_CONTEXTMENU;
    procedure WMPaint(var Message: TMessage); message WM_PAINT;
    procedure WMCOMMAND(var Message: TMessage); message WM_COMMAND;
    procedure WMCtlColor(var Message: TMessage); message WM_CTLCOLOREDIT;

    // Window size
    procedure CalcWndSize;

    procedure NewTable(ColNumber, RowNumber: Integer);

    procedure InsertLine;
    function CanInsert: Boolean;
    procedure AddLine;
    function CanAdd: Boolean;
    procedure DeleteLine;

    procedure InsertCell;
    procedure DeleteCell;
    procedure AddCell;

    procedure CombineCell;

    procedure SplitCell;
    procedure VSplitCell(Number: Integer);
    function CanSplit: Boolean;

    procedure SetCellLines(bLeftLine, bTopLine, bRightLine, bBottomLine: Boolean;
      nLeftLineWidth, nTopLineWidth, nRightLineWidth, nBottomLineWidth: Integer);

    procedure SetCellDiagonal(NewDiagonal: UINT);
    procedure SetCellColor(NewTextColor, NewBackColor: COLORREF);
    procedure SetCellFont(CellFont: TLOGFONT);
    procedure SetCellAlign(NewHorzAlign, NewVertAlign: Integer);

    procedure SetMargin(nLeftMargin, nTopMargin, nRightMargin, nBottomMargin: Integer);
    function GetMargin: TRect;

    function getcellfont:tfont; // add wang hang song

    procedure UpdateLines;

    procedure StartMouseDrag(point: TPoint);
    procedure StartMouseSelect(point: TPoint; bSelectFlag: Boolean; shift_down: byte);
    procedure MouseMoveHandler(message: TMSG);

    // 選中區(qū)的操作
    function AddSelectedCell(Cell: TReportCell): Boolean;
    function RemoveSelectedCell(Cell: TReportCell): Boolean;
    procedure RemoveAllSelectedCell;

    function IsCellSelected(Cell: TReportCell): Boolean;
    function CellFromPoint(point: TPoint): TReportCell;

    property IsPreview: Boolean read FPreviewStatus write FPreviewStatus default False;
    property ReportScale: Integer read FReportScale write SetScale default 100;
    property IsNewTable: Boolean read FNewTable write FNewTable default True;
    property DataLine: Integer read FDataLine write FDataLine default 2147483647;
    property TablePerPage: Integer read FTablePerPage write FTablePerPage default 2147483647;

  published
    { Published declarations }
    property Left;
    property Top;
    property Cursor;
    property Hint;
    property Visible default True;
    property Enabled default True;
    property OnMouseMove;
    property OnMouseDown;
    property OnMouseUp;
    property ShowHint;
  end;

  TDatasetItem = class(TObject)
    pDataset: TDataset;
    strName: string;
  end;

  TVarTableItem = class(TObject)
    strVarName: string;
    strVarValue: string;
  end;

  TMyRect = class(TObject)
  public
    Left: Integer;
    Top: Integer;
    Right: Integer;
    Bottom: Integer;
  end;

  TReportRunTime = class(TComponent)
  private
    FFileName: TFileName;
    FAutoGroup : Boolean;
    FEnableEdit : Boolean;
    FDList: TList; // 保存數(shù)據(jù)集的指針和名稱的對照
    FVarList: TList; // 保存變量的名字和值的對照表
    FLineList: TList; // 保存報(bào)表的設(shè)計(jì)信息(從文件中讀入)
    FPrintLineList: TList; //保存要打印的某一頁的行信息
    FOwnerCellList: TList; // 保存每一頁中合并后單元格前后的指針

    Width: Integer;
    Height: Integer;

    // 定義換頁加表頭
    FNewTable: Boolean;

    //定義行號
    FLineNum:Integer;
    FSubLineNum:Integer;

    //定義從表數(shù)據(jù)葉好
    FSubPageNum:Integer;

    // 定義打印多少行后從新加表頭
    FDataLine: Integer;
    FTablePerPage: Integer;

    FReportScale: Integer;
    FPageWidth: Integer;
    FPageHeight: Integer;

    FHeaderHeight: Integer;

    Fallprint: Boolean; //是否打印全部記錄,默認(rèn)為全部

    FLeftMargin: Integer;
    FRightMargin: Integer;
    FTopMargin: Integer;
    FBottomMargin: Integer;

    FLeftMargin1: Integer;
    FRightMargin1: Integer;
    FTopMargin1: Integer;
    FBottomMargin1: Integer;

    FPageCount: Integer; // page count in print preview

    procedure UpdateLines;
    procedure UpdatePrintLines;
    procedure PrintOnePage;
    procedure LoadRptFile;
    function GetDatasetName(strCellText: string): string;
    function GetDataset(strCellText: string): TDataset;
    function DatasetByName(strDatasetName: string): TDataset;
    function GetVarValue(strVarName: string): string;
    function GetFieldName(strCellText: string): string;
    procedure SetRptFileName(const Value: TFileName);
    procedure SaveTempFile(PageNumber: Integer);
    procedure LoadTempFile(strFileName: string);
    procedure DeleteAllTempFiles;
    procedure SetAutoGroup(Value : Boolean);
    procedure SetEnableEdit(Value : Boolean);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    procedure SetDataset(strDatasetName: string; pDataSet: TDataSet);
    procedure SetVarValue(strVarName, strVarValue: string);
    property allprint: boolean read Fallprint write Fallprint default true;
    procedure ResetContent;
    procedure PrintPreview(bPreviewMode: Boolean);
    procedure PreparePrint;
    procedure loadfile(value: tfilename);
    procedure Print;
    procedure Resetself;
    Function Cancelprint:boolean;
  published
    property ReportFile: TFileName read FFileName write SetRptFileName;
    property AutoGroup:boolean Read Fautogroup Write setautogroup Default True;
    property EnableEdit:boolean Read FEnableEdit Write setEnableEdit;
  end;

  TCellTable = class(TObject)
    PrevCell: TReportCell;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成在人线在线播放| 成人av电影免费观看| 91在线观看污| 国产精品美女久久久久高潮| 国产在线国偷精品产拍免费yy| 欧美精品123区| 五月天久久比比资源色| 精品视频一区 二区 三区| 亚洲色图欧美偷拍| 欧美日韩一区成人| 亚洲视频一二三| 91在线观看美女| 亚洲精品中文字幕在线观看| 一本一本久久a久久精品综合麻豆| 国产精品三级电影| 日本久久电影网| 人妖欧美一区二区| 国产欧美日韩卡一| 欧美在线观看禁18| 午夜精品123| 国产无人区一区二区三区| fc2成人免费人成在线观看播放 | 色综合天天做天天爱| 亚洲免费大片在线观看| 欧美日韩国产美| 蜜桃久久久久久久| 精品精品国产高清一毛片一天堂| 国产成人精品亚洲777人妖| 亚洲欧美激情插| 亚洲欧美日韩国产一区二区三区 | 国产精品久久久久天堂| 欧美伦理电影网| kk眼镜猥琐国模调教系列一区二区| 亚洲精品国产第一综合99久久 | 91久久精品网| 经典三级一区二区| 午夜欧美大尺度福利影院在线看| 国产日韩欧美麻豆| 在线播放91灌醉迷j高跟美女| 成人综合在线视频| 久久国产生活片100| 亚洲成人中文在线| 亚洲妇熟xx妇色黄| 精品国产自在久精品国产| 在线国产电影不卡| 99re在线精品| 99国产欧美另类久久久精品| 激情综合网天天干| 久久精品理论片| 玖玖九九国产精品| 国产一区二区美女| 美腿丝袜亚洲一区| 91国偷自产一区二区三区成为亚洲经典| 国产xxx精品视频大全| 美女视频免费一区| 久久精品国产一区二区三| 精品无码三级在线观看视频| 国产成人精品在线看| 色综合久久久久久久久久久| 在线观看国产一区二区| 欧美丰满少妇xxxxx高潮对白| 欧美性大战久久久久久久 | 视频一区国产视频| 亚洲第一电影网| 狠狠色丁香久久婷婷综合丁香| 国产美女视频一区| 成人av综合在线| 色婷婷综合激情| 欧美一级片在线| 欧美国产日韩a欧美在线观看| 伊人一区二区三区| 男男视频亚洲欧美| 波多野洁衣一区| 欧美午夜免费电影| 欧美国产激情二区三区| 三级精品在线观看| 国产一区二区在线电影| 色av综合在线| 久久久久久夜精品精品免费| 国产一区二区三区黄视频| 欧美日韩一级片网站| 国产欧美日韩亚州综合| 美女视频黄免费的久久 | 亚洲蜜臀av乱码久久精品蜜桃| 奇米综合一区二区三区精品视频 | 国内精品伊人久久久久av一坑| 一本到三区不卡视频| 久久久综合网站| 免费视频最近日韩| 欧美日韩另类一区| 日韩一区中文字幕| 国产福利精品一区| 久久女同精品一区二区| 另类欧美日韩国产在线| 国产乱码精品一区二区三区五月婷| 亚洲午夜久久久久| 日本乱人伦一区| 亚洲综合一区二区三区| 日本大香伊一区二区三区| 一区二区三区四区乱视频| www.欧美日韩| 国产精品三级电影| 一本色道久久加勒比精品 | 久久午夜羞羞影院免费观看| 日本欧美一区二区三区乱码 | 99久久99久久免费精品蜜臀| 亚洲男人的天堂在线观看| 色综合久久久久网| 亚洲va韩国va欧美va精品| 91精品在线麻豆| 激情综合网天天干| 亚洲日韩欧美一区二区在线| 欧美三级三级三级爽爽爽| 免费在线看一区| 中文字幕一区二区三区在线播放| 99久久国产综合色|国产精品| 亚洲大片在线观看| 久久精子c满五个校花| 在线亚洲高清视频| 国产高清精品网站| 亚洲国产一区视频| 国产精品欧美久久久久一区二区 | 日本久久精品电影| 国产一区二区三区在线观看免费 | 午夜精品福利一区二区蜜股av | 亚洲一区在线免费观看| 7777精品伊人久久久大香线蕉的 | 亚洲精品一线二线三线无人区| 色综合中文字幕国产| 亚洲国产精品嫩草影院| 国产亚洲一区二区在线观看| 制服丝袜在线91| 91美女视频网站| 成人永久免费视频| 国产成人精品免费在线| 国产专区欧美精品| 琪琪久久久久日韩精品| 午夜激情久久久| 视频一区在线视频| 天堂资源在线中文精品| 亚洲影视资源网| 亚洲国产精品久久艾草纯爱| 一区二区视频在线看| 亚洲人成电影网站色mp4| 亚洲精品午夜久久久| 成人免费在线播放视频| 中文字幕视频一区二区三区久| 日本一区二区免费在线观看视频| 久久人人97超碰com| 久久人人超碰精品| 日本一区二区三级电影在线观看 | 婷婷夜色潮精品综合在线| 日韩 欧美一区二区三区| 蜜臀久久久99精品久久久久久| 午夜精品久久久久久不卡8050| 日韩主播视频在线| 老司机精品视频导航| 成人午夜碰碰视频| 色成人在线视频| 91精品国产乱码久久蜜臀| 欧美一区二区三区播放老司机| 日韩欧美一区二区不卡| 中文字幕乱码日本亚洲一区二区| 一区二区在线免费| 奇米精品一区二区三区四区| 久久成人精品无人区| 99精品国产一区二区三区不卡| 欧美日韩一区国产| 精品免费国产一区二区三区四区| 国产欧美日韩视频一区二区| 亚洲风情在线资源站| 国产在线精品视频| 日本韩国精品一区二区在线观看| 91精品国产黑色紧身裤美女| 最新不卡av在线| 久久机这里只有精品| 欧美人成免费网站| 亚洲精品国产无天堂网2021 | 狠狠色综合色综合网络| 欧美日韩一卡二卡三卡| 国产精品黄色在线观看| 麻豆国产欧美一区二区三区| 欧美在线观看一区二区| 亚洲欧洲三级电影| 成人免费毛片a| 国产香蕉久久精品综合网| 免费观看一级特黄欧美大片| 欧美日韩免费视频| 亚洲最大成人综合| 91麻豆成人久久精品二区三区| 国产免费成人在线视频| 国产盗摄一区二区三区| 国产欧美中文在线| 国产成人亚洲精品狼色在线| 久久一日本道色综合| 国产最新精品精品你懂的| 2020国产精品| 懂色一区二区三区免费观看 | 欧美一区二区三区免费视频 | 国产成人亚洲综合a∨猫咪|