home *** CD-ROM | disk | FTP | other *** search
- unit Rep;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- vivrep20, ComCtrls
- {$IFDEF VER140}
- , Variants
- {$ENDIF}
- ;
-
- type
- TRepForm = class(TForm)
- VividReport: TVividReport;
- MasterPage: TVRPage;
- VRBand1: TVRBand;
- VRBand2: TVRBand;
- VRBand3: TVRBand;
- SysInfo: TVRLabel;
- RepTitle: TVRLabel;
- Grid: TVRGrid;
- VRBand4: TVRBand;
-
- procedure GridCells3CalcValue(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- RepForm: TRepForm;
-
- implementation
-
- uses Dm;
-
- {$R *.DFM}
-
- procedure TRepForm.GridCells3CalcValue(Sender: TObject);
- var
- ASum: Variant;
- begin
- ASum := DModule.RepSumQuery.Lookup ('CustNo;PaymentMethod',
- VarArrayOf([DModule.RepCustQueryCustNo.Value,
- DModule.RepMethodsQueryPaymentMethod.Value]),'TotalSum');
-
- if VarIsNull (ASum) then
- (Sender as TAbsCurrency).Value := 0
- else
- (Sender as TAbsCurrency).Value := ASum;
- end;
-
- end.
-