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

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

?? reportcontrol.~pa

?? 國產(chǎn)的報表控件
?? ~PA
?? 第 1 頁 / 共 5 頁
字號:
{************************************
*  表格式報表處理系統(tǒng) of  DELPHI    *
*  China Report system of DELPHI    *
*  簡稱:CReport V3.0               *
*  原創(chuàng):郭家駿、王寒松             *
*  修改:廖伯志                     *
*  修改:趙慧誠,本人水平有限(大部   *
*  分看不懂),只能增加行號和子行號;*
*  LineNum行號,SubLineNum子行號(每個*
*  子表行號)                        *
*  最后修改日期: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; // 計算得來
    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; // 保存報表的設(shè)計信息(從文件中讀入)
    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一区二区三区免费野_久草精品视频
欧美www视频| 日韩视频免费直播| 亚洲成av人在线观看| 欧美日韩久久不卡| 开心九九激情九九欧美日韩精美视频电影| 777欧美精品| 麻豆91精品91久久久的内涵| 91精品久久久久久蜜臀| 国产盗摄女厕一区二区三区| 亚洲精品成人精品456| 日韩色视频在线观看| 白白色亚洲国产精品| 日韩精品一级二级| 国产精品福利在线播放| 精品视频1区2区3区| 国产一区二区精品久久| 亚洲午夜免费电影| 国产亚洲一二三区| 欧美日韩在线观看一区二区| 国产精品456| 天天射综合影视| 国产精品视频你懂的| 在线播放欧美女士性生活| 豆国产96在线|亚洲| 日韩中文字幕一区二区三区| 中文字幕一区二区三中文字幕| 日韩三级视频在线看| 欧美午夜精品一区| 成人av网站大全| 国产黄色精品视频| 久久精品国产99国产| 丝袜诱惑亚洲看片| 一二三区精品视频| 成人欧美一区二区三区在线播放| 国产欧美一区二区三区网站 | 欧美激情一二三区| 久久久久久久网| 2023国产一二三区日本精品2022| 欧美一区二区三区小说| 9191国产精品| 91精品婷婷国产综合久久| 欧美视频一区二区在线观看| 色婷婷av久久久久久久| 91免费国产在线观看| 成人av动漫在线| 不卡大黄网站免费看| 成人av影院在线| www.日韩av| 91丝袜国产在线播放| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 奇米色777欧美一区二区| 丝袜国产日韩另类美女| 日本成人在线一区| 日韩精品成人一区二区三区| 日韩电影在线免费| 欧美a一区二区| 国产自产v一区二区三区c| 国产精品夜夜嗨| 波多野结衣在线aⅴ中文字幕不卡| 成人免费视频视频在线观看免费| 福利一区在线观看| 91麻豆免费观看| 欧美午夜电影在线播放| 欧美日韩大陆在线| 欧美videossexotv100| 国产亚洲欧美在线| 国产精品第四页| 亚洲午夜免费电影| 麻豆国产欧美日韩综合精品二区| 精品一区中文字幕| 成人动漫中文字幕| 色999日韩国产欧美一区二区| 欧美日韩黄色影视| 久久免费偷拍视频| 亚洲桃色在线一区| 日韩中文字幕av电影| 国产精品自拍毛片| 色呦呦国产精品| 日韩欧美国产电影| 国产精品久久午夜夜伦鲁鲁| 亚洲裸体在线观看| 麻豆成人av在线| 色综合网色综合| 日韩欧美中文字幕公布| 国产精品二三区| 日韩av中文字幕一区二区三区| 国产高清在线观看免费不卡| 在线看一区二区| 精品电影一区二区| 亚洲精品免费看| 国产综合久久久久久鬼色| 91麻豆精品视频| 精品日韩一区二区三区| 亚洲男同1069视频| 国产一区二区三区不卡在线观看| 色综合久久久久久久| 精品1区2区在线观看| 一区二区三区四区亚洲| 国模一区二区三区白浆| 欧美自拍偷拍午夜视频| 久久久久久久久久久久电影| 亚洲一区二区三区四区在线免费观看| 九色综合狠狠综合久久| 欧美制服丝袜第一页| 久久久久久久久久美女| 日韩成人一级片| 色综合视频在线观看| 久久影院视频免费| 亚洲不卡av一区二区三区| a亚洲天堂av| 久久综合久久综合久久| 日韩精品电影在线观看| 一本色道a无线码一区v| 久久精品亚洲乱码伦伦中文| 五月激情综合婷婷| 色婷婷综合久久久中文字幕| 国产日本欧洲亚洲| 国产一区二区三区日韩| 在线不卡的av| 亚洲一区二区三区视频在线| 成人深夜福利app| 精品国产一二三| 蜜桃视频在线观看一区二区| 在线观看亚洲精品视频| 国产精品久久久久久久第一福利| 国产一区二区按摩在线观看| 日韩限制级电影在线观看| 亚洲不卡在线观看| 成人免费不卡视频| 欧美一区二区免费| 亚洲精品在线免费播放| 午夜国产精品一区| 在线免费观看视频一区| 亚洲欧美视频在线观看视频| 99麻豆久久久国产精品免费| 精品成人在线观看| 国产在线看一区| 26uuu亚洲| 久久精品国产久精国产| 日韩天堂在线观看| 免费高清在线一区| 日韩欧美综合一区| 久久精品国产亚洲高清剧情介绍| 欧美一区二区三区视频免费播放| 视频在线在亚洲| 91精品国产综合久久福利软件 | 精品1区2区3区| 亚洲.国产.中文慕字在线| 欧美日韩精品免费| 日本欧美一区二区| 精品国产精品网麻豆系列| 国产尤物一区二区在线| 国产欧美日韩不卡免费| 成+人+亚洲+综合天堂| 亚洲欧美日本韩国| 精品视频在线免费| 日韩精品电影在线| 久久午夜老司机| 成人美女在线观看| 一个色综合网站| 日韩一级片网址| 国产自产视频一区二区三区| 日本一区二区成人| 欧亚一区二区三区| 麻豆成人在线观看| 国产精品视频观看| 欧美三级在线看| 麻豆成人在线观看| 国产精品久久久一本精品 | 色综合一个色综合| 日日夜夜精品视频天天综合网| 欧美大尺度电影在线| 丁香婷婷综合网| 亚洲免费大片在线观看| 欧美一区二区三区免费观看视频| 久久99精品一区二区三区| 欧美国产国产综合| 欧美日韩中文字幕一区二区| 老司机精品视频导航| 国产精品欧美极品| 欧美美女网站色| 国产夫妻精品视频| 亚洲宅男天堂在线观看无病毒| 欧美一区二区三区免费观看视频| 粉嫩13p一区二区三区| 亚洲一区在线观看免费观看电影高清| 日韩一区二区三区视频| 成人黄色a**站在线观看| 丝袜国产日韩另类美女| 日本一区二区三区国色天香 | 亚洲精品一区二区三区在线观看 | 9191成人精品久久| 不卡免费追剧大全电视剧网站| 午夜在线成人av| 国产欧美精品一区aⅴ影院| 欧美日韩免费高清一区色橹橹 | 亚洲精品一区在线观看| 在线观看av不卡| 国产乱码精品一区二区三区忘忧草| 亚洲欧美激情一区二区|