home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 May
/
VPR9705A.ISO
/
VPR_DATA
/
PROGRAM
/
CBTRIAL
/
SETUP
/
DATA.Z
/
QUICKREP.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-14
|
35KB
|
950 lines
//----------------------------------------------------------------------------
// QuickRep.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: QuickRep.pas
//----------------------------------------------------------------------------
#ifndef QuickRepHPP
#define QuickRepHPP
//----------------------------------------------------------------------------
#include <ComCtrls.hpp>
#include <qrconst.hpp>
#include <DsgnIntf.hpp>
#include <DBTables.hpp>
#include <DB.hpp>
#include <DBCtrls.hpp>
#include <ExtCtrls.hpp>
#include <StdCtrls.hpp>
#include <Printers.hpp>
#include <Dialogs.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <Controls.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysUtils.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Quickrep
{
//-- type declarations -------------------------------------------------------
enum TQRBandType { rbTitle, rbPageHeader, rbDetail, rbPageFooter, rbSummary, rbGroupHeader, rbGroupFooter,
rbSubDetail, rbColumnHeader, rbOverlay };
enum TQRPaperSize { qrpDefault, qrpLetter, qrpLegal, qrpA3, qrpA4, qrpA5, qrpCustom };
class __declspec(delphiclass) TQRFrame;
class __declspec(pascalimplementation) TQRFrame : public Graphics::TPen
{
typedef Graphics::TPen inherited;
private:
bool FTop;
bool FBottom;
bool FRight;
bool FLeft;
__published:
__property bool DrawTop = {read=FTop, write=FTop, nodefault};
__property bool DrawBottom = {read=FBottom, write=FBottom, nodefault};
__property bool DrawLeft = {read=FLeft, write=FLeft, nodefault};
__property bool DrawRight = {read=FRight, write=FRight, nodefault};
public:
/* TPen.Create */ __fastcall TQRFrame(void) : Graphics::TPen() { }
/* TPen.Destroy */ __fastcall virtual ~TQRFrame(void) { }
};
typedef void __fastcall (__closure *TOnPreviewEvent)(void);
enum TQRPrinterStatus { mpReady, mpBusy, mpFinished, mpPrinting, mpPreviewing };
typedef void __fastcall (__closure *TReportNeedDataEvent)(bool &MoreData);
typedef void __fastcall (__closure *TQRFilterEvent)(bool &PrintRecord);
typedef void __fastcall (__closure *TQRReportBeforePrintEvent)(bool &PrintReport);
struct TQRFileHeader
{
Word FormatVersion;
Word QRVersion;
int PageHeight;
int PageWidth;
int Inch;
int PageCount;
System::SmallString<80> ReportTitle;
System::TDateTime CreateDateTime;
bool Portrait;
Byte EmptySpace[256];
} ;
class __declspec(delphiclass) TQRController;
class __declspec(delphiclass) TQRBand;
typedef void __fastcall (__closure *TQRBandAfterPrintEvent)(bool BandPrinted);
typedef void __fastcall (__closure *TQRBandBeforePrintEvent)(bool &PrintBand);
class __declspec(delphiclass) TQuickReport;
class __declspec(pascalimplementation) TQRController : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
Db::TDataSource* FDataSource;
TQRBand* FDetailBand;
TQRBand* FFooterBand;
TQRBand* FHeaderBand;
TReportNeedDataEvent FNeedDataEvent;
TQRFilterEvent FOnFilterEvent;
bool FPrintBefore;
Classes::TList* SubList;
void __fastcall SetHeaderBand(TQRBand* aBand);
void __fastcall SetFooterBand(TQRBand* aBand);
void __fastcall SetDetailBand(TQRBand* aBand);
void __fastcall SetDataSource(Db::TDataSource* Value);
protected:
__property TQRBand* DetailBand = {read=FDetailBand, write=SetDetailBand, nodefault};
__property TQRBand* FooterBand = {read=FFooterBand, write=SetFooterBand, nodefault};
__property TQRBand* HeaderBand = {read=FHeaderBand, write=SetHeaderBand, nodefault};
__property bool PrintBefore = {read=FPrintBefore, write=FPrintBefore, nodefault};
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
public:
__fastcall virtual TQRController(Classes::TComponent* AOwner);
__fastcall virtual ~TQRController(void);
void __fastcall AddSub(TQRController* aController);
__property Classes::TList* SubData = {read=SubList, nodefault};
__published:
__property Db::TDataSource* DataSource = {read=FDataSource, write=SetDataSource, nodefault};
__property TQRFilterEvent OnFilter = {read=FOnFilterEvent, write=FOnFilterEvent};
__property TReportNeedDataEvent OnNeedData = {read=FNeedDataEvent, write=FNeedDataEvent};
};
class __declspec(delphiclass) TQRProgressForm;
class __declspec(pascalimplementation) TQRProgressForm : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
Stdctrls::TButton* CancelBtn;
Forms::TForm* Form;
Comctrls::TProgressBar* gauge;
Stdctrls::TLabel* Label1;
long UpdateInterval;
long LastUpdate;
System::AnsiString __fastcall GetCaption(void);
System::AnsiString __fastcall GetText(void);
void __fastcall Cancel(System::TObject* Sender);
void __fastcall SetCaption( System::AnsiString Value);
void __fastcall SetMaxValue(long Value);
void __fastcall SetText( System::AnsiString Value);
void __fastcall SetValue(long Value);
public:
__fastcall virtual TQRProgressForm(Classes::TComponent* AOwner);
__fastcall virtual ~TQRProgressForm(void);
void __fastcall Show(void);
__property System::AnsiString Caption = {read=GetCaption, write=SetCaption, nodefault};
__property long MaxValue = {write=SetMaxValue, nodefault};
__property System::AnsiString Text = {read=GetText, write=SetText, nodefault};
__property long Value = {write=SetValue, nodefault};
};
class __declspec(delphiclass) TQRGroup;
enum TQReportClass { qrcDataSource, qrcEventDriven, qrcSingleDetail };
class __declspec(pascalimplementation) TQuickReport : public TQRController
{
typedef TQRController inherited;
private:
Classes::TList* AllBands[10];
Classes::TList* AllCalcFields;
Dialogs::TPrintDialog* aPrintDialog;
TQRProgressForm* aProgressForm;
HRGN aRgn;
int FColumnWidth;
int CurrentCol;
int CurrentPageStart;
Classes::TList* DetailLinks;
bool DidNewPage;
bool DTPFinish;
Classes::TNotifyEvent FAfterDetailsEvent;
Classes::TNotifyEvent FAfterPrintEvent;
Classes::TNotifyEvent FBeforeDetailsEvent;
TQRReportBeforePrintEvent FBeforePrintEvent;
double FColumnMargin;
int FColumns;
long FCurY;
long FCurX;
bool FDisplayPrintDialog;
long FFooterHeight;
Forms::TForm* FForm;
TQRGroup* FGroups[10];
double FLeftMargin;
TReportNeedDataEvent FNeedDataEvent;
Classes::TNotifyEvent FOnEndPage;
TQRFilterEvent FOnFilterEvent;
Classes::TNotifyEvent FOnNewPage;
TPrinterOrientation FOrientation;
Classes::TNotifyEvent FOnStartPage;
long FPageCount;
TQRFrame* FPageFrame;
long FPageHeight;
long FPageNumber;
int FPaperLength;
TQRPaperSize FPaperSize;
int FPaperWidth;
long FPageWidth;
long FRecordCount;
long FRecordNo;
System::AnsiString FReportTitle;
bool FRestartData;
bool FShowProgress;
bool FSQLCompatible;
bool FTitleBeforeHD;
double FXFactor;
double FYFactor;
TQReportClass ReportClass;
bool StuffPrinted;
TQRGroup* __fastcall GetGroup(int Index);
long __fastcall GetColumnMarginInches(void);
long __fastcall GetColumnMarginMM(void);
long __fastcall GetLeftMarginInches(void);
long __fastcall GetLeftMarginMM(void);
bool __fastcall GetFirstData(Db::TDataSource* DataSource, TReportNeedDataEvent OnNeedDataEvent, TQRFilterEvent
OnFilterEvent);
bool __fastcall GetNextData(Db::TDataSource* DataSource, TReportNeedDataEvent OnNeedDataEvent, TQRFilterEvent
OnFilterEvent);
int __fastcall GetPaperLength(void);
TQRPaperSize __fastcall GetPaperSize(void);
int __fastcall GetPaperWidth(void);
void __fastcall PrintGroupHeaders(void);
void __fastcall PrintBand(TQRBand* aBand);
void __fastcall PrintBands(TQRBandType BandToPrint);
bool __fastcall PrintGroupFooters(bool LastFooters);
void __fastcall DrawPageFrame(void);
void __fastcall PrinterNewPage(void);
void __fastcall SetColumnMarginInches(long Value);
void __fastcall SetColumnMarginMM(long Value);
void __fastcall SetColumns(int value);
void __fastcall SetGroup(int Index, TQRGroup* aGroup);
void __fastcall SetLeftMarginInches(long Value);
void __fastcall SetLeftMarginMM(long Value);
void __fastcall SetPaperLength(int value);
void __fastcall SetPaperSize(TQRPaperSize value);
void __fastcall SetPaperWidth(int value);
protected:
void __fastcall CalculateFields(Db::TDataSource* ADataSource);
void __fastcall CheckForSpace(TQRBand* aBand);
void __fastcall CreateReport(void);
__property long Curx = {read=FCurX, write=FCurX, nodefault};
__property long CurY = {read=FCurY, write=FCurY, nodefault};
__property long FooterHeight = {read=FFooterHeight, write=FFooterHeight, nodefault};
__property TQRGroup* Group[int Index] = {read=GetGroup, write=SetGroup};
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
void __fastcall PrepareForPrinter(void);
public:
__fastcall virtual TQuickReport(Classes::TComponent* AOwner);
__fastcall virtual ~TQuickReport(void);
long __fastcall XPos(long Coor);
long __fastcall YPos(long Coor);
void __fastcall NewPage(void);
void __fastcall Prepare(void);
void __fastcall Preview(void);
void __fastcall Print(void);
__property int ColumnWidth = {read=FColumnWidth, nodefault};
__property long PageCount = {read=FPageCount, nodefault};
__property long PageHeight = {read=FPageHeight, nodefault};
__property long PageNumber = {read=FPageNumber, write=FPageNumber, nodefault};
__property long PageWidth = {read=FPageWidth, nodefault};
__property long RecordCount = {read=FRecordCount, nodefault};
__property long RecordNo = {read=FRecordNo, nodefault};
__published:
__property Classes::TNotifyEvent AfterDetail = {read=FAfterDetailsEvent, write=FAfterDetailsEvent};
__property Classes::TNotifyEvent AfterPrint = {read=FAfterPrintEvent, write=FAfterPrintEvent};
__property Classes::TNotifyEvent BeforeDetail = {read=FBeforeDetailsEvent, write=FBeforeDetailsEvent
};
__property TQRReportBeforePrintEvent BeforePrint = {read=FBeforePrintEvent, write=FBeforePrintEvent
};
__property long ColumnMarginInches = {read=GetColumnMarginInches, write=SetColumnMarginInches, nodefault
};
__property long ColumnMarginMM = {read=GetColumnMarginMM, write=SetColumnMarginMM, nodefault};
__property int Columns = {read=FColumns, write=SetColumns, nodefault};
__property bool DisplayPrintDialog = {read=FDisplayPrintDialog, write=FDisplayPrintDialog, nodefault
};
__property long LeftMarginInches = {read=GetLeftMarginInches, write=SetLeftMarginInches, nodefault}
;
__property long LeftMarginMM = {read=GetLeftMarginMM, write=SetLeftMarginMM, nodefault};
__property Classes::TNotifyEvent OnEndPage = {read=FOnEndPage, write=FOnEndPage};
__property Classes::TNotifyEvent OnStartPage = {read=FOnStartPage, write=FOnStartPage};
__property Printers::TPrinterOrientation Orientation = {read=FOrientation, write=FOrientation, nodefault
};
__property TQRFrame* PageFrame = {read=FPageFrame, write=FPageFrame, nodefault};
__property int PaperLength = {read=GetPaperLength, write=SetPaperLength, nodefault};
__property TQRPaperSize PaperSize = {read=GetPaperSize, write=SetPaperSize, nodefault};
__property int PaperWidth = {read=GetPaperWidth, write=SetPaperWidth, nodefault};
__property System::AnsiString ReportTitle = {read=FReportTitle, write=FReportTitle, nodefault};
__property bool RestartData = {read=FRestartData, write=FRestartData, nodefault};
__property bool ShowProgress = {read=FShowProgress, write=FShowProgress, default=1};
__property bool SQLCompatible = {read=FSQLCompatible, write=FSQLCompatible, nodefault};
__property bool TitleBeforeHeader = {read=FTitleBeforeHD, write=FTitleBeforeHD, nodefault};
};
enum TQRRuler { qrrNone, qrrInchesH, qrrInchesV, qrrInchesHV, qrrCmH, qrrCmV, qrrCmHV };
class __declspec(delphiclass) TQRDBCalc;
class __declspec(pascalimplementation) TQRBand : public Extctrls::TCustomPanel
{
typedef Extctrls::TCustomPanel inherited;
private:
TQRBandAfterPrintEvent FAfterPrintEvent;
TQRBandBeforePrintEvent FBeforePrintEvent;
bool FEnabled;
bool FForceNewPage;
TQRFrame* FFrame;
Extctrls::TCustomPanel* FLinkBand;
TQRBandType FQRBandType;
TQuickReport* FReport;
TQRRuler FRuler;
Classes::TList* CalcResetList;
TQRFrame* __fastcall GetFrame(void);
virtual void __fastcall Paint(void);
void __fastcall SetFrame(TQRFrame* Value);
void __fastcall SetLinkBand(Extctrls::TCustomPanel* Value);
void __fastcall SetRuler(TQRRuler Value);
protected:
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
public:
__fastcall virtual TQRBand(Classes::TComponent* AOwner);
__fastcall virtual ~TQRBand(void);
int __fastcall StretchHeight(bool IncludeNext);
bool __fastcall print(long X, long Y);
void __fastcall AddCalcReset(TQRDBCalc* aQRDBCalc);
void __fastcall ClearResetList(void);
__property TQuickReport* ParentReport = {read=FReport, write=FReport, nodefault};
__published:
__property TQRBandAfterPrintEvent AfterPrint = {read=FAfterPrintEvent, write=FAfterPrintEvent};
__property Align ;
__property TQRBandType BandType = {read=FQRBandType, write=FQRBandType, nodefault};
__property TQRBandBeforePrintEvent BeforePrint = {read=FBeforePrintEvent, write=FBeforePrintEvent};
__property Color ;
__property bool Enabled = {read=FEnabled, write=FEnabled, default=1};
__property Font ;
__property bool ForceNewPage = {read=FForceNewPage, write=FForceNewPage, nodefault};
__property TQRFrame* Frame = {read=GetFrame, write=SetFrame, nodefault};
__property Extctrls::TCustomPanel* LinkBand = {read=FLinkBand, write=SetLinkBand, nodefault};
__property ParentFont ;
__property TQRRuler Ruler = {read=FRuler, write=SetRuler, nodefault};
public:
/* TWinControl.CreateParented */ __fastcall TQRBand(HWND ParentWindow) : Extctrls::TCustomPanel(ParentWindow
) { }
};
class __declspec(delphiclass) TQRPrinter;
class __declspec(pascalimplementation) TQRPrinter : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
int aHandle;
TQRProgressForm* aProgressForm;
bool FCancel;
Graphics::TMetafileCanvas* FCanvas;
long FCapabilities;
bool FEnableOpen;
bool FEnablePrint;
bool FEnableSave;
int FToPage;
int FFromPage;
int FLeftWaste;
Graphics::TMetafile* FMetaFile;
TOnPreviewEvent FOnPreviewEvent;
TPrinterOrientation FOrientation;
Graphics::TMetafile* FPage;
int FPageCount;
int FPageHeight;
int FPageNumber;
int FPageWidth;
System::AnsiString FPreviewCaption;
bool FPrinterOK;
System::AnsiString FProgressCaption;
System::AnsiString FTitle;
int FTopWaste;
int FTotalPageWidth;
int FTotalPageHeight;
int FThumbs;
bool FShowProgress;
TQRPrinterStatus FStatus;
bool FZoomButtons;
Classes::TList* MetaList;
char *FDevice;
char *FDriver;
char *FPort;
int FHandle;
DEVMODEA *FDeviceMode;
int __fastcall GetPDPaperWidth(void);
void __fastcall SetPDPaperWidth(int value);
TQRPaperSize __fastcall GetPDPaperSize(void);
void __fastcall SetPDPaperSize(TQRPaperSize Value);
int __fastcall GetPDPaperLength(void);
void __fastcall setPDPaperLength(int Value);
int __fastcall GetPDCopies(void);
void __fastcall SetPDCopies(int Value);
int __fastcall GetPDPaperBin(void);
void __fastcall SetPDPaperBin(int Value);
bool __fastcall LockPrinter(void);
void __fastcall UnlockPrinter(void);
bool __fastcall Supported(long Cap);
bool __fastcall PageOK(int Value);
void __fastcall AddPageToList(void);
void __fastcall Init(void);
void __fastcall MakeCanvas(void);
void __fastcall SetToPage(int Value);
void __fastcall SetFromPage(int Value);
void __fastcall SetOrientation(Printers::TPrinterOrientation value);
void __fastcall SetPageNumber(int Value);
void __fastcall SetThumbs(int Value);
public:
__fastcall virtual TQRPrinter(Classes::TComponent* Owner);
__fastcall virtual ~TQRPrinter(void);
void __fastcall BeginDoc(void);
void __fastcall Cancel(void);
void __fastcall Cleanup(void);
void __fastcall CopyPageToClipBoard(void);
void __fastcall EndDoc(void);
void __fastcall Load( System::AnsiString Filename);
void __fastcall NewPage(void);
void __fastcall Preview(void);
void __fastcall Print(void);
void __fastcall ResetPaperSize(void);
void __fastcall Save( System::AnsiString Filename);
__property bool Canceled = {read=FCancel, write=FCancel, nodefault};
__property Graphics::TMetafileCanvas* Canvas = {read=FCanvas, write=FCanvas, nodefault};
__property int Copies = {read=GetPDCopies, write=SetPDCopies, nodefault};
__property bool EnableOpenBtn = {read=FEnableOpen, write=FEnableOpen, default=1};
__property bool EnablePrintBtn = {read=FEnablePrint, write=FEnablePrint, default=1};
__property bool EnableSaveBtn = {read=FEnableSave, write=FEnableSave, default=1};
__property int ToPage = {read=FToPage, write=SetToPage, nodefault};
__property int FromPage = {read=FFromPage, write=SetFromPage, nodefault};
__property int LeftWaste = {read=FLeftWaste, write=FLeftWaste, nodefault};
__property TOnPreviewEvent OnPreview = {read=FOnPreviewEvent, write=FOnPreviewEvent};
__property Printers::TPrinterOrientation Orientation = {read=FOrientation, write=SetOrientation, nodefault
};
__property Graphics::TMetafile* Page = {read=FPage, nodefault};
__property int PageHeight = {read=FPageHeight, nodefault};
__property int PageCount = {read=FPageCount, nodefault};
__property int PageNumber = {read=FPageNumber, write=SetPageNumber, nodefault};
__property int PageWidth = {read=FPageWidth, nodefault};
__property int PaperBin = {read=GetPDPaperBin, write=SetPDPaperBin, nodefault};
__property int PaperLength = {read=GetPDPaperLength, write=setPDPaperLength, nodefault};
__property TQRPaperSize PaperSize = {read=GetPDPaperSize, write=SetPDPaperSize, nodefault};
__property int PaperWidth = {read=GetPDPaperWidth, write=SetPDPaperWidth, nodefault};
__property System::AnsiString PreviewCaption = {read=FPreviewCaption, write=FPreviewCaption, nodefault
};
__property bool PrinterOK = {read=FPrinterOK, nodefault};
__property System::AnsiString ProgressCaption = {read=FProgressCaption, write=FProgressCaption, nodefault
};
__property bool ShowProgress = {read=FShowProgress, write=FShowProgress, default=1};
__property TQRPrinterStatus Status = {read=FStatus, nodefault};
__property System::AnsiString Title = {read=FTitle, write=FTitle, nodefault};
__property int TopWaste = {read=FTopWaste, write=FTopWaste, nodefault};
__property int TotalPageHeight = {read=FTotalPageHeight, write=FTotalPageHeight, nodefault};
__property int TotalPageWidth = {read=FTotalPageWidth, write=FTotalPageWidth, nodefault};
__property int Thumbs = {read=FThumbs, write=SetThumbs, nodefault};
__property bool ZoomButtons = {read=FZoomButtons, write=FZoomButtons, nodefault};
};
enum TQRZoomState { qrZoomToFit, qrZoomToWidth, qrZoomOther };
class __declspec(delphiclass) TQRCustomPreview;
class __declspec(pascalimplementation) TQRCustomPreview : public Controls::TGraphicControl
{
typedef Controls::TGraphicControl inherited;
public:
int Zoom;
__fastcall virtual TQRCustomPreview(Classes::TComponent* AOwner);
virtual void __fastcall Paint(void);
__published:
__property Align ;
public:
/* TGraphicControl.Destroy */ __fastcall virtual ~TQRCustomPreview(void) { }
};
class __declspec(delphiclass) TQRPreview;
class __declspec(pascalimplementation) TQRPreview : public Forms::TScrollBox
{
typedef Forms::TScrollBox inherited;
private:
TQRCustomPreview* FCustomPrPanel;
int FPageNumber;
int FZoom;
TQRZoomState ZoomState;
void __fastcall SetPageNumber(int Value);
void __fastcall SetZoom(int value);
void __fastcall UpdateZoom(void);
void __fastcall Fixvalues(System::TObject* Sender);
public:
__fastcall virtual TQRPreview(Classes::TComponent* aOwner);
void __fastcall ZoomToWidth(void);
void __fastcall ZoomToFit(void);
__published:
__property int PageNumber = {read=FPageNumber, write=SetPageNumber, nodefault};
__property int Zoom = {read=FZoom, write=SetZoom, nodefault};
public:
/* TScrollingWinControl.Destroy */ __fastcall virtual ~TQRPreview(void) { }
public:
/* TWinControl.CreateParented */ __fastcall TQRPreview(HWND ParentWindow) : Forms::TScrollBox(ParentWindow
) { }
};
class __declspec(delphiclass) TQRStandardPreview;
class __declspec(pascalimplementation) TQRStandardPreview : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
Forms::TForm* Form;
Buttons::TSpeedButton* FitPageBtn;
Buttons::TSpeedButton* FitWidthBtn;
Buttons::TSpeedButton* HundredBtn;
Stdctrls::TButton* ExitBtn;
Extctrls::TPanel* InfoPanel;
Buttons::TBitBtn* CopyBtn;
Buttons::TBitBtn* LoadBtn;
Buttons::TBitBtn* FirstBtn;
Buttons::TBitBtn* LastBtn;
Buttons::TBitBtn* NextBtn;
Buttons::TBitBtn* PrevBtn;
Buttons::TBitBtn* PrintBtn;
TQRPreview* QRPreview;
Buttons::TBitBtn* SaveBtn;
Extctrls::TPanel* TopPanel;
Stdctrls::TComboBox* ZoomCombo;
void __fastcall ClickCopy(System::TObject* sender);
void __fastcall ClickExit(System::TObject* Sender);
void __fastcall ClickFirst(System::TObject* Sender);
void __fastcall ClickNext(System::TObject* Sender);
void __fastcall ClickLast(System::TObject* Sender);
void __fastcall ClickOpen(System::TObject* Sender);
void __fastcall ClickPrev(System::TObject* Sender);
void __fastcall ClickPrint(System::TObject* Sender);
void __fastcall ClickSave(System::TObject* Sender);
void __fastcall ClickFitPage(System::TObject* Sender);
void __fastcall ClickHundred(System::TObject* Sender);
void __fastcall ClickFitWidth(System::TObject* Sender);
void __fastcall FixScrollBars(void);
void __fastcall HScroll(System::TObject* Sender, Stdctrls::TScrollCode ScrollCode, int &ScrollPos);
void __fastcall Resize(System::TObject* Sender);
void __fastcall SetZoom(System::TObject* Sender);
void __fastcall UpdateInfo(void);
void __fastcall VScroll(System::TObject* Sender, Stdctrls::TScrollCode ScrollCode, int &ScrollPos);
public:
__fastcall virtual TQRStandardPreview(Classes::TComponent* AOwner);
__fastcall virtual ~TQRStandardPreview(void);
void __fastcall Show(void);
};
typedef void __fastcall (__closure *TGroupNeedDataEvent)( System::AnsiString &Value);
class __declspec(pascalimplementation) TQRGroup : public Classes::TComponent
{
typedef Classes::TComponent inherited;
protected:
Dbtables::TFieldDataLink* FDataLink;
System::AnsiString LastData;
System::AnsiString NextLastData;
TQRBand* FFooterBand;
int FLevel;
TGroupNeedDataEvent FOnNeedData;
TQRBand* FHeaderBand;
bool FReprint;
System::AnsiString __fastcall GetDataField(void);
Db::TDataSource* __fastcall GetDataSource(void);
void __fastcall SetDataField(const System::AnsiString Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
void __fastcall SetHeaderBand(TQRBand* aBand);
void __fastcall SetFooterBand(TQRBand* aBand);
public:
__fastcall virtual TQRGroup(Classes::TComponent* AOwner);
void __fastcall Start(void);
bool __fastcall Update(void);
__property System::AnsiString GroupData = {read=NextLastData, nodefault};
__property bool Reprint = {read=FReprint, write=FReprint, nodefault};
__published:
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
__property TQRBand* FooterBand = {read=FFooterBand, write=SetFooterBand, nodefault};
__property TQRBand* HeaderBand = {read=FHeaderBand, write=SetHeaderBand, nodefault};
__property int Level = {read=FLevel, write=FLevel, nodefault};
__property TGroupNeedDataEvent OnNeedData = {read=FOnNeedData, write=FOnNeedData};
public:
/* TComponent.Destroy */ __fastcall virtual ~TQRGroup(void) { }
};
class __declspec(delphiclass) TQRDetailLink;
class __declspec(pascalimplementation) TQRDetailLink : public TQRController
{
typedef TQRController inherited;
private:
TQRController* FMaster;
void __fastcall SetMaster(TQRController* Value);
public:
__fastcall virtual TQRDetailLink(Classes::TComponent* AOwner);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
bool __fastcall print(long X, long Y);
__published:
__property DetailBand ;
__property FooterBand ;
__property HeaderBand ;
__property TQRController* Master = {read=FMaster, write=SetMaster, nodefault};
__property PrintBefore ;
public:
/* TQRController.Destroy */ __fastcall virtual ~TQRDetailLink(void) { }
};
enum TQRPrintOrder { qrColByCol, qrRowByRow };
enum TQReportType { qrStandard, qrMasterDetail, qrSingleDetail };
typedef void __fastcall (__closure *TQRLabelOnPrintEvent)(System::TObject* sender, System::AnsiString &
Value);
class __declspec(delphiclass) TQRCustomControl;
class __declspec(pascalimplementation) TQRCustomControl : public Stdctrls::TCustomLabel
{
typedef Stdctrls::TCustomLabel inherited;
private:
bool FAlignToBand;
TQRLabelOnPrintEvent FOnPrintEvent;
TQuickReport* FReport;
__property bool AlignToBand = {read=FAlignToBand, write=FAlignToBand, nodefault};
protected:
__property TQRLabelOnPrintEvent OnPrint = {read=FOnPrintEvent, write=FOnPrintEvent};
public:
__fastcall virtual TQRCustomControl(Classes::TComponent* AOwner);
virtual void __fastcall Paint(void);
virtual void __fastcall Print(int X, int Y);
virtual void __fastcall Stretch(int &size);
__property AutoSize = {stored=true, default=1};
__property TQuickReport* ParentReport = {read=FReport, write=FReport, nodefault};
__published:
__property Height ;
__property Left ;
__property Top ;
__property Visible ;
__property Width ;
public:
/* TGraphicControl.Destroy */ __fastcall virtual ~TQRCustomControl(void) { }
};
enum TQRShapeType { qrsRectangle, qrsCircle, qrsVertLine, qrsHorLine, qrsTopAndBottom, qrsRightAndLeft
};
class __declspec(delphiclass) TQRShape;
class __declspec(pascalimplementation) TQRShape : public TQRCustomControl
{
typedef TQRCustomControl inherited;
private:
TQRShapeType FShape;
Graphics::TBrush* FBrush;
Graphics::TPen* FPen;
void __fastcall SetBrush(Graphics::TBrush* Value);
void __fastcall SetPen(Graphics::TPen* Value);
void __fastcall SetShape(TQRShapeType Value);
public:
virtual void __fastcall Paint(void);
virtual void __fastcall Print(int X, int Y);
void __fastcall StyleChanged(System::TObject* sender);
__fastcall virtual TQRShape(Classes::TComponent* AOwner);
__fastcall virtual ~TQRShape(void);
__published:
__property Graphics::TBrush* Brush = {read=FBrush, write=SetBrush, nodefault};
__property Height ;
__property Graphics::TPen* Pen = {read=FPen, write=SetPen, nodefault};
__property TQRShapeType Shape = {read=FShape, write=SetShape, nodefault};
__property Width ;
};
class __declspec(delphiclass) TQRLabel;
class __declspec(pascalimplementation) TQRLabel : public TQRCustomControl
{
typedef TQRCustomControl inherited;
private:
Graphics::TBrush* FBrush;
bool FFramed;
Graphics::TPen* FPen;
void __fastcall SetBrush(Graphics::TBrush* Value);
void __fastcall SetPen(Graphics::TPen* Value);
__property bool Framed = {read=FFramed, write=FFramed, nodefault};
__property Graphics::TPen* Pen = {read=FPen, write=SetPen, nodefault};
__property Graphics::TBrush* Brush = {read=FBrush, write=SetBrush, nodefault};
public:
__fastcall virtual TQRLabel(Classes::TComponent* AOwner);
__fastcall virtual ~TQRLabel(void);
virtual void __fastcall Print(int X, int Y);
virtual void __fastcall Stretch(int &size);
__published:
__property Alignment ;
__property AutoSize ;
__property Caption ;
__property AlignToBand ;
__property Color ;
__property Font ;
__property OnPrint ;
__property ParentFont ;
__property Transparent ;
};
class __declspec(delphiclass) TQRMemo;
class __declspec(pascalimplementation) TQRMemo : public Stdctrls::TCustomMemo
{
typedef Stdctrls::TCustomMemo inherited;
private:
TQuickReport* FReport;
void __fastcall ReadStringData(Classes::TReader* Reader);
protected:
virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
public:
__fastcall virtual TQRMemo(Classes::TComponent* AOwner);
void __fastcall Print(int x, int y);
__property TQuickReport* ParentReport = {read=FReport, write=FReport, nodefault};
__published:
__property Alignment ;
__property Color ;
__property Font ;
__property Lines ;
__property ParentFont ;
__property WordWrap ;
public:
/* TCustomMemo.Destroy */ __fastcall virtual ~TQRMemo(void) { }
public:
/* TWinControl.CreateParented */ __fastcall TQRMemo(HWND ParentWindow) : Stdctrls::TCustomMemo(ParentWindow
) { }
};
class __declspec(delphiclass) TQRDBText;
class __declspec(pascalimplementation) TQRDBText : public TQRCustomControl
{
typedef TQRCustomControl inherited;
protected:
Dbtables::TFieldDataLink* FDataLink;
System::AnsiString __fastcall GetDataField(void);
Db::TDataSource* __fastcall GetDataSource(void);
void __fastcall DataChange(System::TObject* Sender);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
void __fastcall SetDataField(const System::AnsiString Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
public:
__fastcall virtual TQRDBText(Classes::TComponent* AOwner);
__fastcall virtual ~TQRDBText(void);
virtual void __fastcall Print(int X, int Y);
virtual void __fastcall Stretch(int &size);
__published:
__property Alignment ;
__property AlignToBand ;
__property AutoSize ;
__property Color ;
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
__property Font ;
__property OnPrint ;
__property ParentFont ;
__property Transparent ;
};
enum TQRCalcOperation { qrcSUM, qrcCOUNT, qrcMAX, qrcMIN, qrcAVERAGE };
class __declspec(pascalimplementation) TQRDBCalc : public TQRDBText
{
typedef TQRDBText inherited;
private:
long FCount;
double FRealMax;
double FRealMin;
long FIntMax;
long FIntMin;
long FIntSum;
TQRCalcOperation FOperation;
System::AnsiString FPrintMask;
double FRealSum;
TQRBand* FResetBand;
long __fastcall GetAsInteger(void);
double __fastcall GetAsReal(void);
void __fastcall CreateCaption(void);
void __fastcall Calculate(void);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
void __fastcall SetResetBand(TQRBand* Value);
void __fastcall SetOperation(TQRCalcOperation Value);
public:
__fastcall virtual TQRDBCalc(Classes::TComponent* AOwner);
virtual void __fastcall Print(int X, int Y);
void __fastcall Start(void);
__property long AsInteger = {read=GetAsInteger, nodefault};
__property double AsReal = {read=GetAsReal};
__published:
__property OnPrint ;
__property TQRCalcOperation Operation = {read=FOperation, write=SetOperation, nodefault};
__property ParentFont ;
__property System::AnsiString PrintMask = {read=FPrintMask, write=FPrintMask, nodefault};
__property TQRBand* ResetBand = {read=FResetBand, write=SetResetBand, nodefault};
public:
/* TQRDBText.Destroy */ __fastcall virtual ~TQRDBCalc(void) { }
};
enum TQRSysDataType { qrsTime, qrsDate, qrsDateTime, qrsPageNumber, qrsReportTitle, qrsDetailCount,
qrsDetailNo };
class __declspec(delphiclass) TQRSysData;
class __declspec(pascalimplementation) TQRSysData : public TQRCustomControl
{
typedef TQRCustomControl inherited;
private:
TQRSysDataType FData;
System::AnsiString FText;
void __fastcall SetData(TQRSysDataType Value);
HIDESBASE void __fastcall SetText( System::AnsiString Value);
void __fastcall CreateCaption(void);
public:
__fastcall virtual TQRSysData(Classes::TComponent* AOwner);
virtual void __fastcall Paint(void);
virtual void __fastcall Print(int X, int Y);
__published:
__property Alignment ;
__property AlignToBand ;
__property AutoSize ;
__property Color ;
__property TQRSysDataType Data = {read=FData, write=SetData, nodefault};
__property Font ;
__property OnPrint ;
__property ParentFont ;
__property System::AnsiString Text = {read=FText, write=SetText, nodefault};
__property Transparent ;
public:
/* TGraphicControl.Destroy */ __fastcall virtual ~TQRSysData(void) { }
};
class __declspec(delphiclass) TQRDesignModePreview;
class __declspec(pascalimplementation) TQRDesignModePreview : public Dsgnintf::TComponentEditor
{
typedef Dsgnintf::TComponentEditor inherited;
private:
void __fastcall ShowAboutBox(void);
protected:
TQuickReport* FReport;
public:
__fastcall virtual TQRDesignModePreview(Classes::TComponent* AComponent, Dsgnintf::TFormDesigner* ADesigner
);
virtual void __fastcall Edit(void);
virtual void __fastcall ExecuteVerb(int Index);
virtual System::AnsiString __fastcall GetVerb(int Index);
virtual int __fastcall GetVerbCount(void);
public:
/* TObject.Destroy */ __fastcall virtual ~TQRDesignModePreview(void) { }
};
//-- var, const, procedure ---------------------------------------------------
#define QuickReportMaxGroups (Byte)(9)
#define QuickReportVersion (Byte)(100)
#define QRFileFormatVersion (Byte)(1)
#define cQRVersion "1.0d"
extern System::AnsiString cQRProgressCaption;
extern System::AnsiString cQRPreviewCaption;
#define cQRPageShadowWidth (Byte)(2)
#define cQRPageFrameWidth (Byte)(1)
#define cQRPageShadowColor (int)(0)
#define cQRGroupStartValue "#$&QuIcKrEpOrT&$#"
extern long qrOrgRes;
extern TQRZoomState qrDefaultZoom;
extern TQRPrinter* QRPrinter;
extern void __fastcall Register(void);
//-- template instantiations -------------------------------------------------
template class SmallString<80> ;
} /* namespace Quickrep */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Quickrep;
#endif
//-- end unit ----------------------------------------------------------------
#endif // QuickRep