Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Sort on Index with 3 fields causes big troubles (dBase)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Erich Brunner  
View profile  
 More options Oct 8 1998, 3:00 am
Newsgroups: borland.public.delphi.database.desktop
From: "Erich Brunner" <erich-brun...@xpoint.at>
Date: 1998/10/08
Subject: Sort on Index with 3 fields causes big troubles (dBase)
Hello Everyone!

I am usung a year calender table (e.g. 1998) and set in the
OnRowChange event( VCL modified not standard TDBGrid)

(ONRowChange will be triggered when you move the record pointer
up or down.)

a Range in a second table which is displayed in a second DBGrid
with an Table.Indexname with 3 keyfields.

in the OnRowchange Event ....

Table.CancelRange;
Table.Indexname := 'DATE+EMPLOYEE+TIME'; <-- the sort only works with '+'
signs and not with semicolons ';'.

Table.SetRangeStart;

............<--- start keyvalues assigned  to the 3 keyfields

Table.SetRangeEnd;

.......     <--- end keyvalues assigned  to the 3 keyfields

Table.ApplyRange;

My first question:

1. Why does my sort only work with '+' and not with semicolons ';'?

The second step is to calculate an CalcField with the total work hours/ per
day
of this employee.

For Example at the 5th Oct. 1998 this emplyee had 3 records
with 3 hours in the first ; 4 hours in the second and 3 hours in the
third.

To calculate this total hours for this day I wrote a simply add function
 were I add very keyvalue of the working hour field up to the next....

This Result for each day will be display in a calcfield of my calender table
for
the depending day.

I trigger the add function within the OnCalcFieldsEvent

So and here is my question.

After start Up of my DB App when the CalcfieldsEvent has
finished I get for every day a correct result of my total hour Table field
calculated in the calender table , expect the 1. Record.

In the 1. record of my calender table ( this is the 1. record in
my range ( range is set on the month, for example 'January'))

Hear is Table.BOF = TRUE I checked it with the Breakpoints .

Everything looks fine but it does not work. Even when a Calcfield
Event will be triggered again .

For example when I add a new record to emplyee ---> total working
hours will be increased -----> OnCalcfields Event
will be triggered  , then I get the correct hours in the 1. Record, too.

Can anyone help me. With the Indexname := ''DATE;EMPLOYEE';
it work everytime.

PS: Very indexed field is a TStringField !!!

Sorry for the long explanation but I couldn´t make it shorter.

Best Regards;

Eric

IB-DATA
erich-brun...@xpoint.at


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »