Subject Re: [IBO] Dumb calc fields question
Author Robert martin
Thanks

That works great. Since I am asking stupid questions this morning, why
not one more !

How do I change the position of the fields in a grid? I use the
'FieldProperties' property of the TQuery to handle formatting etc but
dont see where the position is handled?

Rob Martin
Software Engineer

phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com

Wild Software Ltd



chef_007@... wrote:

>hi,
>
>
>
>>--- Urspr√ľngliche Nachricht ---
>>Von: Robert martin <rob@...>
>>An: IBObjects@yahoogroups.com
>>Betreff: [IBO] Dumb calc fields question
>>Datum: Wed, 08 Feb 2006 09:24:20 +1300
>>
>>Hi
>>
>>I am using the TIB_Query component and have defined a calc field.
>>
>>In the Oncalc event I have the following code, which returns results but
>>not the correct results !
>>
>>
>> if (AField.FieldName = 'ETA') then begin
>> AField.AsDateTime :=
>>ARow.Statement.FieldByName('NextShipDate').AsDateTime;
>> end;
>>
>>
>Try ARow.ByName('NextShipDate').AsDateTime;
>otherwise your not fetching the value from the buffer row that is currently
>processing your event handler but instead from the row that is the currently
>selected one.
>
>
>
>>Do I need the 'if (AField.FieldName = 'ETA') then begin '. Is this
>>code run once per row or once for each column in the row?
>>
>>
>it's run for each calculated field.
>
>
>
>>ARow.Statement.FieldByName('NextShipDate').AsDateTime; Is not returning
>>the correct date. (no date at all). What is the correct way to access
>>other field data?
>>
>>
>>
>>--
>>Rob Martin
>>Software Engineer
>>
>>phone +64 03 377 0495
>>fax +64 03 377 0496
>>web www.chreos.com
>>
>>Wild Software Ltd
>>
>>
>>
>>
>>
>>
>___________________________________________________________________________
>
>
>>IB Objects - direct, complete, custom connectivity to Firebird or
>>InterBase
>> without the need for BDE, ODBC or any other layer.
>>
>>
>>
>___________________________________________________________________________
>
>
>>http://www.ibobjects.com - your IBO community resource for Tech Info
>>papers,
>>keyword-searchable FAQ, community code contributions and more !
>>Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>
>