| View previous topic :: View next topic |
| Author |
Message |
Yew Mun Tai Guest
|
Posted: Fri Feb 25, 2005 3:29 am Post subject: Sorting calculated fields |
|
|
Hello,
I need to do sorting on a calculated field. I understand that it's not
possible and that I should change the field type to fkInternalCalc. If I do
that, where and how do I do the calculation and set the value for the field?
Thanx
|
|
| Back to top |
|
 |
Bill Todd Guest
|
Posted: Fri Feb 25, 2005 2:07 pm Post subject: Re: Sorting calculated fields |
|
|
Use the OnCalcFields event just as with a calculated field.
--
Bill Todd (TeamB)
TeamB cannot answer questions received via email
|
|
| Back to top |
|
 |
Yew Mun Tai Guest
|
Posted: Sat Feb 26, 2005 8:28 am Post subject: Re: Sorting calculated fields |
|
|
Thanx. I've done that, but I encounter the below error msg.
Project Project1.exe raised exception class EDatabasaeError with message
'Field 'GroupName' cannot be modified'. Process stopped. Use Step to Run or
continue.
GroupName is the name of the fkInternalCalc field. I am using Delphi 7.
"Bill Todd" <no (AT) no (DOT) com> wrote
| Quote: | Use the OnCalcFields event just as with a calculated field.
--
Bill Todd (TeamB)
TeamB cannot answer questions received via email
|
|
|
| Back to top |
|
 |
Bill Todd Guest
|
Posted: Sat Feb 26, 2005 2:01 pm Post subject: Re: Sorting calculated fields |
|
|
Did you create the internal calculated field with the Fields Editor? Did
you follow all of the instructions on page 29-11 of the Developer's Guide?
--
Bill Todd (TeamB)
TeamB cannot answer questions received via email
|
|
| Back to top |
|
 |
Yew Mun Tai Guest
|
Posted: Mon Feb 28, 2005 1:54 am Post subject: Re: Sorting calculated fields |
|
|
It was a calculated field. I changed it's type to internal calculated in the
object inspector.
And no, I forgot about the developer's guide. Will do so now.
"Bill Todd" <no (AT) no (DOT) com> wrote
| Quote: | Did you create the internal calculated field with the Fields Editor? Did
you follow all of the instructions on page 29-11 of the Developer's Guide?
--
Bill Todd (TeamB)
TeamB cannot answer questions received via email
|
|
|
| Back to top |
|
 |
Yew Mun Tai Guest
|
Posted: Mon Feb 28, 2005 2:22 am Post subject: Re: Sorting calculated fields |
|
|
I want to add that the field was working fine when it was a calculated
field. It was after I decide to sort by that field and changed the type to
fkInternalCalc that problems occur.
"Yew Mun Tai" <yewmun (AT) airquace (DOT) com> wrote
| Quote: | It was a calculated field. I changed it's type to internal calculated in
the
object inspector.
And no, I forgot about the developer's guide. Will do so now.
"Bill Todd" <no (AT) no (DOT) com> wrote in message
news:4220814a$1 (AT) newsgroups (DOT) borland.com...
Did you create the internal calculated field with the Fields Editor? Did
you follow all of the instructions on page 29-11 of the Developer's
Guide?
--
Bill Todd (TeamB)
TeamB cannot answer questions received via email
|
|
|
| Back to top |
|
 |
Yew Mun Tai Guest
|
Posted: Mon Feb 28, 2005 2:51 am Post subject: Re: Sorting calculated fields |
|
|
I have solved the problem by just creating a new field from fields editor
instead of just changing the type in the object inspector.
Thanx.
"Yew Mun Tai" <yewmun (AT) airquace (DOT) com> wrote
| Quote: | I want to add that the field was working fine when it was a calculated
field. It was after I decide to sort by that field and changed the type to
fkInternalCalc that problems occur.
"Yew Mun Tai" <yewmun (AT) airquace (DOT) com> wrote in message
news:42227899 (AT) newsgroups (DOT) borland.com...
It was a calculated field. I changed it's type to internal calculated in
the
object inspector.
And no, I forgot about the developer's guide. Will do so now.
"Bill Todd" <no (AT) no (DOT) com> wrote in message
news:4220814a$1 (AT) newsgroups (DOT) borland.com...
Did you create the internal calculated field with the Fields Editor?
Did
you follow all of the instructions on page 29-11 of the Developer's
Guide?
--
Bill Todd (TeamB)
TeamB cannot answer questions received via email
|
|
|
| Back to top |
|
 |
|