Subject Re: [IBO] IB_Grid with Calculated Fields
Author Helen Borrie
At 12:35 PM 11-04-01 +0200, Luc Franzen wrote:

> Calculated Field:
> CUST_RANKING=VARCHAR(20)
>
>Add a OnCalculate event for the Query:
>
>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';

ELSE
aField.AsString := 'No ranking assigned';

> end;
> end;
>end;

Cheers,
Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________