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

  1. unit Rep;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   vivrep20, ComCtrls, Db, DBTables;
  8.  
  9. type
  10.   TRepForm = class(TForm)
  11.     VividReport: TVividReport;
  12.     VRPrintProgress: TVRPrintProgress;
  13.     VRPreview: TVRPreview;
  14.     VRPage1: TVRPage;
  15.     PrnTable: TTable;
  16.     PrnSource: TDataSource;
  17.     PrnTableContact: TStringField;
  18.     PrnTableCompany: TStringField;
  19.     PrnTableAddress: TStringField;
  20.     PrnTableCity: TStringField;
  21.     PrnTableState: TStringField;
  22.     PrnTableZip: TStringField;
  23.     PrnTableCountry: TStringField;
  24.     PrnTableTarget: TStringField;
  25.     VRBand1: TVRBand;
  26.     VRBand2: TVRBand;
  27.     VRBand3: TVRBand;
  28.     VRGrid1: TVRGrid;
  29.         procedure PrnTableTargetGetText(Sender: TField; var Text: String; DisplayText: Boolean);
  30.   private
  31.     { Private declarations }
  32.   public
  33.     { Public declarations }
  34.     constructor Create (AOwner: TComponent); override;
  35.   end;
  36.  
  37. var
  38.   RepForm: TRepForm;
  39.  
  40. implementation
  41.  
  42. {$R *.DFM}
  43.  
  44. constructor TRepForm.Create (AOwner: TComponent);
  45. begin
  46.   inherited Create (AOwner);
  47.   PrnTable.Active:= true;
  48. end;
  49.  
  50. procedure TRepForm.PrnTableTargetGetText(Sender: TField; var Text: String; DisplayText: Boolean);
  51. begin
  52.   Text := PrnTableContact.AsString + #13#10 + PrnTableCompany.AsString + #13#10 +
  53.          PrnTableAddress.AsString + #13#10 +
  54.          PrnTableCity.AsString + ', ' + PrnTableState.AsString + ' ' +
  55.          PrnTableZip.AsString + #13#10 + PrnTableCountry.AsString;
  56. end;
  57.  
  58. end.
  59.