Subject | Re: [IBO] Example of CalculateFields ! |
---|---|
Author | Andreas Hesse |
Post date | 2009-06-09T08:26Z |
mmusetti70 schrieb:
procedure TdmVorgang.dataAdresseCalculateField(Sender: TIB_Statement;
ARow: TIB_Row; AField: TIB_Column);
begin
if SameText(AField.FieldName, 'Adresszeile') then
AField.AsString := CreateAdresszeile(ARow)
else if SameText(AField.FieldName, 'Anschrift') then
AField.AsString := CreateAnschrift(ARow);
end;
Important:
The Event Parameters gives you all, you need
- use the row of the event (it is not always the same as your Query.Row
- use the field of the event
(attention: it may be null, depends on property CalculateAllFields)
--
Andreas
> Hi, in my table I have a field DATE. How do the difference between the current date and the field DATA using CalculateFields ?Here is an example of a OnCalculate - Event:
>
> Thanks,
>
> Marcos
>
>
procedure TdmVorgang.dataAdresseCalculateField(Sender: TIB_Statement;
ARow: TIB_Row; AField: TIB_Column);
begin
if SameText(AField.FieldName, 'Adresszeile') then
AField.AsString := CreateAdresszeile(ARow)
else if SameText(AField.FieldName, 'Anschrift') then
AField.AsString := CreateAnschrift(ARow);
end;
Important:
The Event Parameters gives you all, you need
- use the row of the event (it is not always the same as your Query.Row
- use the field of the event
(attention: it may be null, depends on property CalculateAllFields)
--
Andreas