home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 February / Chip_2004-02_cd1.bin / program / delphi / navody / d56 / ec1vr2.exe / #setuppath# / Delphi / Mastdet / Rep.pas < prev   
Encoding:
Pascal/Delphi Source File  |  2003-12-09  |  1.3 KB  |  62 lines

  1. unit Rep;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   vivrep20, ComCtrls;
  8.  
  9. type
  10.   TRepForm = class(TForm)
  11.     VividReport: TVividReport;
  12.     MasterPage: TVRPage;
  13.     VRBand1: TVRBand;
  14.     VRBand2: TVRBand;
  15.     VRBand3: TVRBand;
  16.     Page2: TVRPage;
  17.     Page3: TVRPage;
  18.     ChildReport: TVividReport;
  19.     ChildPage1: TVRPage;
  20.     ChildPage2: TVRPage;
  21.     VRBand4: TVRBand;
  22.     VRGrid1: TVRGrid;
  23.     VRBand5: TVRBand;
  24.     VRBand6: TVRBand;
  25.     VRGrid2: TVRGrid;
  26.     VRGrid3: TVRGrid;
  27.     VRBand7: TVRBand;
  28.     VRBand8: TVRBand;
  29.     VRSysInfo: TVRLabel;
  30.     VRRepTitle: TVRLabel;
  31.  
  32.     procedure ChildPage2BeforePrint(Sender: TObject; var Print: TBeforeAction);
  33.     procedure ChildReportEndPrint(Sender: TObject; var ARepeat: TAfterAction);
  34.   private
  35.     { Private declarations }
  36.   public
  37.     { Public declarations }
  38.   end;
  39.  
  40. var
  41.   RepForm: TRepForm;
  42.  
  43. implementation
  44.  
  45. uses Dm;
  46.  
  47. {$R *.DFM}
  48.  
  49. procedure TRepForm.ChildPage2BeforePrint(Sender: TObject; var Print: TBeforeAction);
  50. begin
  51.   if not VRGrid3.QueryNewBand (VRBand7,true) then Print := baNoPrint
  52.   else VRBand7.Controller := Nil;
  53. end;
  54.  
  55. procedure TRepForm.ChildReportEndPrint(Sender: TObject; var ARepeat: TAfterAction);
  56. begin
  57.   VRBand7.Controller := VRGrid3;
  58.   VRBand7.BandIndex := 0;
  59. end;
  60.  
  61. end.
  62.