Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clipper 87 quesiton

Status
Not open for further replies.

kathrync2003

Programmer
Mar 25, 2003
19
CA
I'm updating a clipper 87 program and am having a problem with the "total on" command.

eg: total on heat to dup

dup is my database
heat is a field in the database
heat field is indexed

After the command is executed...
the heat number has data in it, but none of the other fields.

Does anyone know why?
 
Hi, Kathrync2003

If you don't specify the fields to total with a fields clause then nothing gets totalled. Only the first record with each new keycode gets copied to the output file "dup".

If you want fields totalled, you have to specify which ones, otherwise it will just copy the first record for each heat value to the output file.

Best regards
Jock
 
Thanks. I tried it and it's giving me the same result as before. So, I've come to the conclusion that this isn't my problem there is something else in my code.

Thanks anyways.
 
If you total on a field
eg: total on heat to dup

and
dup is your database

then nothing happens.
You should use a variable in which you store the result of the total on command.

eg: total on heat to totalheat
and totalheat will contain the result.

Rob.
 
The problem of yours is that you did not initialize the variable to store the corresponding result into the field of entry or you have already a variable that you declared early by public.

Try to initialize the variable again before you execute that command of yours.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top