Subject | Re: [IBO] IB_Grid with Calculated Fields |
---|---|
Author | Helen Borrie |
Post date | 2001-04-12T08:03:21Z |
At 12:35 PM 11-04-01 +0200, Luc Franzen wrote:
aField.AsString := 'No ranking assigned';
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
> Calculated Field:ELSE
> 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';
aField.AsString := 'No ranking assigned';
> end;Cheers,
> end;
>end;
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________