home *** CD-ROM | disk | FTP | other *** search
/ PC Format Collection 48 / SENT14D.ISO / tech / delphi / disk14 / doc.pak / REPORT.INT < prev    next >
Encoding:
Text File  |  1995-08-24  |  3.3 KB  |  125 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Delphi Visual Component Library                 }
  5. {                                                       }
  6. {       Copyright (c) 1995 Borland International        }
  7. {                                                       }
  8. {*******************************************************}
  9.  
  10. unit Report;
  11.  
  12. interface
  13.  
  14. uses SysUtils, WinTypes, WinProcs, Classes, Controls, Forms,
  15.   DDEMan, Dsgnintf;
  16.  
  17. const
  18.   ctDBase = 2;
  19.   ctExcel = 3;
  20.   ctParadox = 4;
  21.   ctAscii = 5;
  22.   ctSqlServer = 6;
  23.   ctOracle = 7;
  24.   ctDB2 = 8;
  25.   ctNetSQL = 9;
  26.   ctSybase = 10;
  27.   ctBtrieve = 11;
  28.   ctGupta = 12;
  29.   ctIngres = 13;
  30.   ctWatcom = 14;
  31.   ctOcelot = 15;
  32.   ctTeraData = 16;
  33.   ctDB2Gupta = 17;
  34.   ctAS400 = 18;
  35.   ctUnify = 19;
  36.   ctQry = 20;
  37.   ctMinNative = 2;
  38.   ctMaxNative = 20;
  39.   ctODBCDBase = 40;
  40.   ctODBCExcel = 41;
  41.   ctODBCParadox = 42;
  42.   ctODBCSqlServer = 43;
  43.   ctODBCOracle = 44;
  44.   ctODBCDB2 = 45;
  45.   ctODBCNetSql = 46;
  46.   ctODBCSybase = 47;
  47.   ctODBCBtrieve = 48;
  48.   ctODBCGupta = 49;
  49.   ctODBCIngres = 50;
  50.   ctODBCDB2Gupta = 51;
  51.   ctODBCTeraData = 52;
  52.   ctODBCAS400 = 53;
  53.   ctODBCDWatcom = 54;
  54.   ctODBCDefault = 55;
  55.   ctODBCUnify = 56;
  56.   ctMinODBC = 40;
  57.   ctMaxODBC = 56;
  58.   ctIDAPIStandard = 60;
  59.   ctIDAPIParadox = 61;
  60.   ctIDAPIDBase = 62;
  61.   ctIDAPIAscii = 63;
  62.   ctIDAPIOracle = 64;
  63.   ctIDAPISybase = 65;
  64.   ctIDAPINovSql = 66;
  65.   ctIDAPIInterbase = 67;
  66.   ctIDAPIIBMEE = 68;
  67.   ctIDAPIDB2 = 69;
  68.   ctIDAPIInformix = 70;
  69.   ctMinIDAPI = 60;
  70.   ctMaxIDAPI = 70;
  71.  
  72. type
  73.   EReportError = class(Exception);
  74.  
  75.   TReport = class(TComponent)
  76.   public
  77.     constructor Create(AOwner: TComponent); override;
  78.     destructor Destroy; override;
  79.     function CloseApplication(ShowDialogs: Boolean): Boolean;
  80.     function CloseReport(ShowDialogs: Boolean): Boolean;
  81.     function Connect(ServerType: Word; const ServerName,
  82.       UserName, Password, DatabaseName:string): Boolean;
  83.     function Print: Boolean;
  84.     function RecalcReport: Boolean;
  85.     procedure Run;
  86.     function RunMacro(Macro: PChar): Boolean;
  87.     function SetVariable(const Name, Value: string): Boolean;
  88.     function SetVariableLines(const Name: string; Value: TStrings): Boolean;
  89.     property ReportHandle: HWND;
  90.     property Busy: Boolean;
  91.     property VersionMajor: Integer;
  92.     property VersionMinor: Integer;
  93.   published
  94.     property ReportName: string;
  95.     property ReportDir: string;
  96.     property PrintCopies: Word default 1;
  97.     property StartPage: Word default 1;
  98.     property EndPage: Word default 9999;
  99.     property MaxRecords: Word default 0;
  100.     property AutoUnload: Boolean default False;
  101.     property InitialValues: TStrings;
  102.     property Preview: Boolean default False;
  103.   end;
  104.  
  105.   TReportEditor = class(TComponentEditor)
  106.   end;
  107.  
  108.   TReportDirProperty = class(TPropertyEditor)
  109.   public
  110.     function GetValue: string; override;
  111.     procedure SetValue(const Value: string); override;
  112.     function GetAttributes: TPropertyAttributes; override;
  113.     procedure Edit; override;
  114.   end;
  115.  
  116.   TReportNameProperty = class(TPropertyEditor)
  117.   public
  118.     function GetValue: string; override;
  119.     procedure SetValue(const Value: string); override;
  120.     function GetAttributes: TPropertyAttributes; override;
  121.     procedure Edit; override;
  122.   end;
  123.  
  124. implementation
  125.