home *** CD-ROM | disk | FTP | other *** search
- unit Rep;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- vivrep20, ComCtrls, Db, DBTables;
-
- type
- TRepForm = class(TForm)
- VividReport: TVividReport;
- VRPrintProgress: TVRPrintProgress;
- VRPreview: TVRPreview;
- VRPage1: TVRPage;
- PrnTable: TTable;
- PrnSource: TDataSource;
- PrnTableContact: TStringField;
- PrnTableCompany: TStringField;
- PrnTableAddress: TStringField;
- PrnTableCity: TStringField;
- PrnTableState: TStringField;
- PrnTableZip: TStringField;
- PrnTableCountry: TStringField;
- PrnTableTarget: TStringField;
- VRBand1: TVRBand;
- VRBand2: TVRBand;
- VRBand3: TVRBand;
- VRGrid1: TVRGrid;
- procedure PrnTableTargetGetText(Sender: TField; var Text: String; DisplayText: Boolean);
- private
- { Private declarations }
- public
- { Public declarations }
- constructor Create (AOwner: TComponent); override;
- end;
-
- var
- RepForm: TRepForm;
-
- implementation
-
- {$R *.DFM}
-
- constructor TRepForm.Create (AOwner: TComponent);
- begin
- inherited Create (AOwner);
- PrnTable.Active:= true;
- end;
-
- procedure TRepForm.PrnTableTargetGetText(Sender: TField; var Text: String; DisplayText: Boolean);
- begin
- Text := PrnTableContact.AsString + #13#10 + PrnTableCompany.AsString + #13#10 +
- PrnTableAddress.AsString + #13#10 +
- PrnTableCity.AsString + ', ' + PrnTableState.AsString + ' ' +
- PrnTableZip.AsString + #13#10 + PrnTableCountry.AsString;
- end;
-
- end.
-