home *** CD-ROM | disk | FTP | other *** search
- {*************************************************}
- {* QuickReport for Delphi *}
- {* Demo Report SimpRep *}
- {* *}
- {* Shows basic reporting and the use of *}
- {* the QRGroup component with an event handler *}
- {*************************************************}
-
-
- unit Simprep;
-
- interface
-
- uses
- SysUtils, Windows, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, Quickrep, DB, DBTables, StdCtrls, ExtCtrls, Grids,
- DBGrids;
-
- type
- TSimpForm = class(TForm)
- SimpRep: TQuickReport;
- TitleBand: TQRBand;
- Image1: TImage;
- QRLabel1: TQRLabel;
- QRLabel2: TQRLabel;
- DetailBand: TQRBand;
- PageFooterBand: TQRBand;
- QRSysData1: TQRSysData;
- QRShape1: TQRShape;
- QRDBText1: TQRDBText;
- QRDBText3: TQRDBText;
- QRDBText4: TQRDBText;
- QRDBText5: TQRDBText;
- QRBand1: TQRBand;
- QRLabel4: TQRLabel;
- QRLabel5: TQRLabel;
- QRLabel6: TQRLabel;
- QRLabel7: TQRLabel;
- QRLabel8: TQRLabel;
- QRDBText2: TQRDBText;
- QRBand2: TQRBand;
- QRGroup1: TQRGroup;
- procedure QRGroup1NeedData(var Value: string);
- procedure QRBand2AfterPrint(BandPrinted: Boolean);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- SimpForm: TSimpForm;
-
- implementation
-
- uses datasets;
-
- {$R *.DFM}
-
- procedure TSimpForm.QRGroup1NeedData(var Value: string);
- begin
- Value:=copy(CustomerData.CustomersCompany.Value,1,1);
- end;
-
- procedure TSimpForm.QRBand2AfterPrint(BandPrinted: Boolean);
- begin
- SimpRep.NewPage;
- end;
-
- end.
-