home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 April
/
Chip_1997-04_cd.bin
/
prezent
/
cb
/
data.z
/
REPORT.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-01-16
|
13KB
|
388 lines
//----------------------------------------------------------------------------
// Report.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: Report.pas
//----------------------------------------------------------------------------
#ifndef ReportHPP
#define ReportHPP
//----------------------------------------------------------------------------
#include <Bde.hpp>
#include <Messages.hpp>
#include <DsgnIntf.hpp>
#include <DB.hpp>
#include <DdeMan.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Windows.hpp>
#include <SysUtils.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Report
{
//-- type declarations -------------------------------------------------------
class __declspec(delphiclass) EReportError;
class __declspec(pascalimplementation) EReportError : public Sysutils::Exception
{
typedef Sysutils::Exception inherited;
public:
/* Exception.Create */ __fastcall EReportError(const System::AnsiString Msg) : Sysutils::Exception(
Msg) { }
/* Exception.CreateFmt */ __fastcall EReportError(const System::AnsiString Msg, const System::TVarRec
*Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EReportError(int Ident) : Sysutils::Exception(Ident) { }
/* Exception.CreateResFmt */ __fastcall EReportError(int Ident, const System::TVarRec *Args, const
int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EReportError(const System::AnsiString Msg, int AHelpContext) :
Sysutils::Exception(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EReportError(const System::AnsiString Msg, const System::TVarRec
*Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EReportError(int Ident, int AHelpContext) : Sysutils::Exception(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EReportError(int Ident, const System::TVarRec *Args, const
int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext) { }
public:
/* TObject.Destroy */ __fastcall virtual ~EReportError(void) { }
};
#pragma option -b
enum TLaunchType { ltDefault, ltRunTime, ltDesignTime };
#pragma option -b.
class __declspec(delphiclass) TReport;
class __declspec(delphiclass) TReportManager;
struct TCallInfo;
typedef TCallInfo *PCallInfo;
struct TSQLStruct;
typedef TSQLStruct *PSQLStruct;
struct TExecInfo;
typedef TExecInfo *PExecInfo;
struct TStartExecInfo;
typedef TStartExecInfo *PStartExecInfo;
struct TDataElement;
typedef TDataElement *PDataElement;
struct TMemoStruct;
typedef TMemoStruct *PMemoStruct;
class __declspec(pascalimplementation) TReportManager : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
Classes::TList* FReports;
Classes::TList* FDataSets;
HWND FHandle;
System::AnsiString FLastError;
bool FUpdated;
void __fastcall ServerProc(PCallInfo Value);
void __fastcall WndProc(Messages::TMessage &Message);
public:
__fastcall virtual TReportManager(Classes::TComponent* AOwner);
__fastcall virtual ~TReportManager(void);
void __fastcall Add(TReport* Value);
void __fastcall AddDataSet(Classes::TComponent* Root);
void __fastcall Clear(void);
DWord __fastcall EndSQL(PSQLStruct SQLStruct);
DWord __fastcall ExecuteSQL(PExecInfo ExecInfo, PStartExecInfo StartExecInfo);
DWord __fastcall GetColumnList(char * Buffer);
DWord __fastcall GetData(Db::TDataSet* DataSet, PDataElement pStmtMem);
Db::TDataSet* __fastcall GetDataSet(int Index);
Db::TDataSet* __fastcall GetDataSetByName( System::AnsiString Value);
Classes::TList* __fastcall GetDataSets(void);
DWord __fastcall GetMemo(PMemoStruct MemoStruct);
DWord __fastcall GetNext(PSQLStruct SQLStruct, DWord &MoreData);
TReport* __fastcall GetReport(int Index);
void __fastcall GetTableList(char * Buffer);
HIDESBASE void __fastcall Remove(TReport* Value);
void __fastcall UpdateDataSets(void);
bool __fastcall ValidDataType(Db::TFieldType Value);
__property Classes::TList* DataSets = {read=GetDataSets, nodefault};
__property Classes::TList* Reports = {read=FReports, nodefault};
__property Db::TDataSet* DataSet[int Index] = {read=GetDataSet};
__property HWND Handle = {read=FHandle, nodefault};
__property TReport* Report[int Index] = {read=GetReport};
__property bool Updated = {read=FUpdated, nodefault};
};
class __declspec(pascalimplementation) TReport : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
TReportManager* FOwner;
System::AnsiString FReportName;
System::AnsiString FReportDir;
Word FNumCopies;
Word FStartPage;
Word FEndPage;
Word FMaxRecords;
bool FRunTime;
bool FStartedApp;
bool FAutoUnload;
Classes::TStrings* FInitialValues;
bool FLoaded;
int FVersionMajor;
int FVersionMinor;
HWND FReportHandle;
bool FPreview;
TLaunchType FLaunchType;
bool __fastcall GetBusy(void);
Classes::TStrings* __fastcall GetInitialValues(void);
HWND __fastcall GetReportHandle(void);
void __fastcall RunApp(void);
bool __fastcall StartApplication(void);
bool __fastcall ReportActive(void);
int __fastcall RunReport(void);
void __fastcall SetInitialValues(Classes::TStrings* Value);
bool __fastcall UseRunTime(void);
protected:
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
public:
__fastcall virtual TReport(Classes::TComponent* AOwner);
__fastcall virtual ~TReport(void);
int __fastcall CloseApplication(bool ShowDialogs);
int __fastcall CloseReport(bool ShowDialogs);
int __fastcall Connect(Word ServerType, const System::AnsiString ServerName, const System::AnsiString
UserName, const System::AnsiString Password, const System::AnsiString DatabaseName);
int __fastcall Print(void);
int __fastcall RecalcReport(void);
int __fastcall Run(void);
int __fastcall RunMacro(const System::AnsiString Macro);
int __fastcall SetVariable(const System::AnsiString Name, const System::AnsiString Value);
int __fastcall SetVariableLines(const System::AnsiString Name, Classes::TStrings* Value);
__property HWND ReportHandle = {read=FReportHandle, nodefault};
__property bool Busy = {read=GetBusy, nodefault};
__property int VersionMajor = {read=FVersionMajor, nodefault};
__property int VersionMinor = {read=FVersionMinor, nodefault};
__published:
__property System::AnsiString ReportName = {read=FReportName, write=FReportName, nodefault};
__property System::AnsiString ReportDir = {read=FReportDir, write=FReportDir, nodefault};
__property Word PrintCopies = {read=FNumCopies, write=FNumCopies, default=1};
__property Word StartPage = {read=FStartPage, write=FStartPage, default=1};
__property Word EndPage = {read=FEndPage, write=FEndPage, default=9999};
__property Word MaxRecords = {read=FMaxRecords, write=FMaxRecords, default=0};
__property bool AutoUnload = {read=FAutoUnload, write=FAutoUnload, default=0};
__property Classes::TStrings* InitialValues = {read=GetInitialValues, write=SetInitialValues, nodefault
};
__property bool Preview = {read=FPreview, write=FPreview, default=0};
__property TLaunchType LaunchType = {read=FLaunchType, write=FLaunchType, default=0};
};
#pragma option -b
enum TCallType { ctNone, ctDesignId, ctExecuteSQL, ctEndSQL, ctGetError, ctGetTableList, ctGetColumnList,
ctGetNext, ctGetMemo };
#pragma option -b.
#pragma pack(push, 1)
struct Report_3
{
} ;
#pragma pack(pop)
struct TCallInfo
{
int ProcessId;
TCallType CallType;
DWord ErrorCode;
Report_3 Data;
} ;
struct TRSDateTime;
typedef TRSDateTime *PRSDateTime;
struct TRSDateTime
{
Word Year;
Word Month;
Word Day;
Word Hour;
Word Min;
Word Sec;
Word MSec;
} ;
#pragma pack(push, 1)
struct Report_4
{
} ;
#pragma pack(pop)
#pragma pack(push, 1)
struct TDataElement
{
int FieldType;
char ColumnName[32];
Word FieldLength;
DWord Null;
Report_4 Data;
} ;
#pragma pack(pop)
struct TExecInfo
{
Db::TDataSet* DataSet;
DWord MoreRecords;
Word NumCols;
} ;
struct TStartExecInfo
{
int StmtIndex;
char StmtName[20];
char MemoName[20];
char TableName[64];
} ;
struct TMemoStruct
{
Db::TDataSet* DataSet;
int Index;
char ColumnName[32];
int Pos;
} ;
struct TSQLStruct
{
Db::TDataSet* DataSet;
int Index;
} ;
class __declspec(delphiclass) TReportEditor;
class __declspec(pascalimplementation) TReportEditor : public Dsgnintf::TComponentEditor
{
typedef Dsgnintf::TComponentEditor inherited;
private:
virtual void __fastcall Edit(void);
virtual void __fastcall ExecuteVerb(int Index);
virtual System::AnsiString __fastcall GetVerb(int Index);
virtual int __fastcall GetVerbCount(void);
public:
/* TComponentEditor.Create */ __fastcall virtual TReportEditor(Classes::TComponent* AComponent, Dsgnintf::TFormDesigner*
ADesigner) : Dsgnintf::TComponentEditor(AComponent, ADesigner) { }
public:
/* TObject.Destroy */ __fastcall virtual ~TReportEditor(void) { }
};
class __declspec(delphiclass) TReportDirProperty;
class __declspec(pascalimplementation) TReportDirProperty : public Dsgnintf::TPropertyEditor
{
typedef Dsgnintf::TPropertyEditor inherited;
public:
virtual System::AnsiString __fastcall GetValue(void);
virtual void __fastcall SetValue(const System::AnsiString Value);
virtual Dsgnintf::TPropertyAttributes __fastcall GetAttributes(void);
virtual void __fastcall Edit(void);
public:
/* TPropertyEditor.Destroy */ __fastcall virtual ~TReportDirProperty(void) { }
public:
/* TObject.Create */ __fastcall TReportDirProperty(void) : Dsgnintf::TPropertyEditor() { }
};
class __declspec(delphiclass) TReportNameProperty;
class __declspec(pascalimplementation) TReportNameProperty : public Dsgnintf::TPropertyEditor
{
typedef Dsgnintf::TPropertyEditor inherited;
public:
virtual System::AnsiString __fastcall GetValue(void);
virtual void __fastcall SetValue(const System::AnsiString Value);
virtual Dsgnintf::TPropertyAttributes __fastcall GetAttributes(void);
virtual void __fastcall Edit(void);
public:
/* TPropertyEditor.Destroy */ __fastcall virtual ~TReportNameProperty(void) { }
public:
/* TObject.Create */ __fastcall TReportNameProperty(void) : Dsgnintf::TPropertyEditor() { }
};
//-- var, const, procedure ---------------------------------------------------
#define ctDBase (Byte)(2)
#define ctExcel (Byte)(3)
#define ctParadox (Byte)(4)
#define ctAscii (Byte)(5)
#define ctSqlServer (Byte)(6)
#define ctOracle (Byte)(7)
#define ctDB2 (Byte)(8)
#define ctNetSQL (Byte)(9)
#define ctSybase (Byte)(10)
#define ctBtrieve (Byte)(11)
#define ctGupta (Byte)(12)
#define ctIngres (Byte)(13)
#define ctWatcom (Byte)(14)
#define ctOcelot (Byte)(15)
#define ctTeraData (Byte)(16)
#define ctDB2Gupta (Byte)(17)
#define ctAS400 (Byte)(18)
#define ctUnify (Byte)(19)
#define ctQry (Byte)(20)
#define ctMinNative (Byte)(2)
#define ctMaxNative (Byte)(20)
#define ctODBCDBase (Byte)(40)
#define ctODBCExcel (Byte)(41)
#define ctODBCParadox (Byte)(42)
#define ctODBCSqlServer (Byte)(43)
#define ctODBCOracle (Byte)(44)
#define ctODBCDB2 (Byte)(45)
#define ctODBCNetSql (Byte)(46)
#define ctODBCSybase (Byte)(47)
#define ctODBCBtrieve (Byte)(48)
#define ctODBCGupta (Byte)(49)
#define ctODBCIngres (Byte)(50)
#define ctODBCDB2Gupta (Byte)(51)
#define ctODBCTeraData (Byte)(52)
#define ctODBCAS400 (Byte)(53)
#define ctODBCDWatcom (Byte)(54)
#define ctODBCDefault (Byte)(55)
#define ctODBCUnify (Byte)(56)
#define ctMinODBC (Byte)(40)
#define ctMaxODBC (Byte)(56)
#define ctIDAPIStandard (Byte)(60)
#define ctIDAPIParadox (Byte)(61)
#define ctIDAPIDBase (Byte)(62)
#define ctIDAPIAscii (Byte)(63)
#define ctIDAPIOracle (Byte)(64)
#define ctIDAPISybase (Byte)(65)
#define ctIDAPINovSql (Byte)(66)
#define ctIDAPIInterbase (Byte)(67)
#define ctIDAPIIBMEE (Byte)(68)
#define ctIDAPIDB2 (Byte)(69)
#define ctIDAPIInformix (Byte)(70)
#define ctMinIDAPI (Byte)(60)
#define ctMaxIDAPI (Byte)(70)
extern void __fastcall finalization(void);
} /* namespace Report */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Report;
#endif
//-- end unit ----------------------------------------------------------------
#endif // Report