BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sorting calculated fields

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Yew Mun Tai
Guest





PostPosted: Fri Feb 25, 2005 3:29 am    Post subject: Sorting calculated fields Reply with quote



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





PostPosted: Fri Feb 25, 2005 2:07 pm    Post subject: Re: Sorting calculated fields Reply with quote



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





PostPosted: Sat Feb 26, 2005 8:28 am    Post subject: Re: Sorting calculated fields Reply with quote



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





PostPosted: Sat Feb 26, 2005 2:01 pm    Post subject: Re: Sorting calculated fields Reply with 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





PostPosted: Mon Feb 28, 2005 1:54 am    Post subject: Re: Sorting calculated fields Reply with 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

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





PostPosted: Mon Feb 28, 2005 2:22 am    Post subject: Re: Sorting calculated fields Reply with 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

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





PostPosted: Mon Feb 28, 2005 2:51 am    Post subject: Re: Sorting calculated fields Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.