home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 August / VPR9608A.BIN / del20try / install / data.z / SIMPREP.PAS < prev    next >
Pascal/Delphi Source File  |  1996-05-08  |  2KB  |  71 lines

  1. {*************************************************}
  2. {*  QuickReport for Delphi                       *}
  3. {*  Demo Report SimpRep                          *}
  4. {*                                               *}
  5. {*  Shows basic reporting and the use of         *}
  6. {*  the QRGroup component with an event handler  *}
  7. {*************************************************}
  8.  
  9.  
  10. unit Simprep;
  11.  
  12. interface
  13.  
  14. uses
  15.   SysUtils, Windows, Messages, Classes, Graphics, Controls,
  16.   Forms, Dialogs, Quickrep, DB, DBTables, StdCtrls, ExtCtrls, Grids,
  17.   DBGrids;
  18.  
  19. type
  20.   TSimpForm = class(TForm)
  21.     SimpRep: TQuickReport;
  22.     TitleBand: TQRBand;
  23.     Image1: TImage;
  24.     QRLabel1: TQRLabel;
  25.     QRLabel2: TQRLabel;
  26.     DetailBand: TQRBand;
  27.     PageFooterBand: TQRBand;
  28.     QRSysData1: TQRSysData;
  29.     QRShape1: TQRShape;
  30.     QRDBText1: TQRDBText;
  31.     QRDBText3: TQRDBText;
  32.     QRDBText4: TQRDBText;
  33.     QRDBText5: TQRDBText;
  34.     QRBand1: TQRBand;
  35.     QRLabel4: TQRLabel;
  36.     QRLabel5: TQRLabel;
  37.     QRLabel6: TQRLabel;
  38.     QRLabel7: TQRLabel;
  39.     QRLabel8: TQRLabel;
  40.     QRDBText2: TQRDBText;
  41.     QRBand2: TQRBand;
  42.     QRGroup1: TQRGroup;
  43.     procedure QRGroup1NeedData(var Value: string);
  44.     procedure QRBand2AfterPrint(BandPrinted: Boolean);
  45.   private
  46.     { Private declarations }
  47.   public
  48.     { Public declarations }
  49.   end;
  50.  
  51. var
  52.   SimpForm: TSimpForm;
  53.  
  54. implementation
  55.  
  56. uses datasets;
  57.  
  58. {$R *.DFM}
  59.  
  60. procedure TSimpForm.QRGroup1NeedData(var Value: string);
  61. begin
  62.    Value:=copy(CustomerData.CustomersCompany.Value,1,1);
  63. end;
  64.  
  65. procedure TSimpForm.QRBand2AfterPrint(BandPrinted: Boolean);
  66. begin
  67.    SimpRep.NewPage;
  68. end;
  69.  
  70. end.
  71.