home *** CD-ROM | disk | FTP | other *** search
-
- {*******************************************************}
- { }
- { Delphi Visual Component Library }
- { }
- { Copyright (c) 1995 Borland International }
- { }
- {*******************************************************}
-
- unit Report;
-
- interface
-
- uses SysUtils, WinTypes, WinProcs, Classes, Controls, Forms,
- DDEMan, Dsgnintf;
-
- const
- ctDBase = 2;
- ctExcel = 3;
- ctParadox = 4;
- ctAscii = 5;
- ctSqlServer = 6;
- ctOracle = 7;
- ctDB2 = 8;
- ctNetSQL = 9;
- ctSybase = 10;
- ctBtrieve = 11;
- ctGupta = 12;
- ctIngres = 13;
- ctWatcom = 14;
- ctOcelot = 15;
- ctTeraData = 16;
- ctDB2Gupta = 17;
- ctAS400 = 18;
- ctUnify = 19;
- ctQry = 20;
- ctMinNative = 2;
- ctMaxNative = 20;
- ctODBCDBase = 40;
- ctODBCExcel = 41;
- ctODBCParadox = 42;
- ctODBCSqlServer = 43;
- ctODBCOracle = 44;
- ctODBCDB2 = 45;
- ctODBCNetSql = 46;
- ctODBCSybase = 47;
- ctODBCBtrieve = 48;
- ctODBCGupta = 49;
- ctODBCIngres = 50;
- ctODBCDB2Gupta = 51;
- ctODBCTeraData = 52;
- ctODBCAS400 = 53;
- ctODBCDWatcom = 54;
- ctODBCDefault = 55;
- ctODBCUnify = 56;
- ctMinODBC = 40;
- ctMaxODBC = 56;
- ctIDAPIStandard = 60;
- ctIDAPIParadox = 61;
- ctIDAPIDBase = 62;
- ctIDAPIAscii = 63;
- ctIDAPIOracle = 64;
- ctIDAPISybase = 65;
- ctIDAPINovSql = 66;
- ctIDAPIInterbase = 67;
- ctIDAPIIBMEE = 68;
- ctIDAPIDB2 = 69;
- ctIDAPIInformix = 70;
- ctMinIDAPI = 60;
- ctMaxIDAPI = 70;
-
- type
- EReportError = class(Exception);
-
- TReport = class(TComponent)
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- function CloseApplication(ShowDialogs: Boolean): Boolean;
- function CloseReport(ShowDialogs: Boolean): Boolean;
- function Connect(ServerType: Word; const ServerName,
- UserName, Password, DatabaseName:string): Boolean;
- function Print: Boolean;
- function RecalcReport: Boolean;
- procedure Run;
- function RunMacro(Macro: PChar): Boolean;
- function SetVariable(const Name, Value: string): Boolean;
- function SetVariableLines(const Name: string; Value: TStrings): Boolean;
- property ReportHandle: HWND;
- property Busy: Boolean;
- property VersionMajor: Integer;
- property VersionMinor: Integer;
- published
- property ReportName: string;
- property ReportDir: string;
- property PrintCopies: Word default 1;
- property StartPage: Word default 1;
- property EndPage: Word default 9999;
- property MaxRecords: Word default 0;
- property AutoUnload: Boolean default False;
- property InitialValues: TStrings;
- property Preview: Boolean default False;
- end;
-
- TReportEditor = class(TComponentEditor)
- end;
-
- TReportDirProperty = class(TPropertyEditor)
- public
- function GetValue: string; override;
- procedure SetValue(const Value: string); override;
- function GetAttributes: TPropertyAttributes; override;
- procedure Edit; override;
- end;
-
- TReportNameProperty = class(TPropertyEditor)
- public
- function GetValue: string; override;
- procedure SetValue(const Value: string); override;
- function GetAttributes: TPropertyAttributes; override;
- procedure Edit; override;
- end;
-
- implementation
-