Subject | Re: [IBO] IB_Grid with Calculated Fields |
---|---|
Author | Paul Hope |
Post date | 2001-04-12T07:56:54Z |
Be aware that, unlike the BDE, if CUST_RANKING in the example below does not
have a value 1..4 then the field value will get left at the value it was
last calculated and does not automatically get cleared ;-)
Regards
Paul
have a value 1..4 then the field value will get left at the value it was
last calculated and does not automatically get cleared ;-)
Regards
Paul
> procedure TForm1.qryCustCalculateField ( ... )
> begin
> if aField.FieldName = 'CUST_RANKING' then
> begin
> case aRow.ByName ( 'CUST_TYPE' ).AsInteger of
> 1 : aField.AsString := 'NORMAL CUSTOMER';
> 2 : aField.AsString := 'GOOD CUSTOMER';
> 3 : aField.AsString := 'VERY GOOD CUSTOMER';
> 4 : aField.AsString := 'PHANTASTIC CUSTOMER';
> end;
> end;
> end;
>