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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem adding up hours for employees 1

Status
Not open for further replies.

rhurd

Programmer
Dec 15, 2002
22
US
We are trying to add up employee times from a data base using picture.operator (employee) picture.datestamp.
Selection Records: {picture.datestamp}>= {?Start Date} and
{picture.datestamp} <= {?End Date} and
{picture.operator} = {?Operator}
We are picking date ranges and employee's. It is adding up all the hours for the day and returning 24Hrs. The employee on that day worked only 10Hr. We are adding up picture.rtime that is (character) Picture.chargeable (Nuemeric)
 
What is in rtime, and what is in chargeable?

I would assume that whatever is in chargeable is what you want to sum.

Try this experiment:

Insert->Field Object->Right click Formula, name it and place:

val({picture.rtime})

Now place this formula field and the {picture.chargeable} in the details section,right click them and select insert->summary-sum

Run the report and see what they return, chargeable may return 10 hours, or perhaps rtime, or perhaps the sum of both, in which case change the formula you created to be:

val({picture.rtime})+{picture.chargeable}

BTW, the above assumes Crystal 8.5 or earlier for traversing the menu.

Hope this resolved this for you, if not, try posting technical information if you need specific answers, such as:

crystal version
database used
connectivity used
example data and fields
expected output

-k
 
We have located the problem. this is a daily report and I am running it for 30 days. When I drill down to details each record is there 3 times? If I / by 3 on all records they are correct. I am running Ver. 9 Crystal using Visual Fox Pro datadase through ODBC. How can I stop record fron showing up three times in details. I am not using shifts.

Regards
Dick Hurd
 
It's probably a join problem, usually when someone says that here, they aren't the exavt same records.

If the are truly duplicates, select database->select distince records.

Otherwise you should learn how the database is designed and create the proper data set.

Since you don't want to share what your data looks like nor the expected output, it's difficult to diagnose.

-k
 
Hi Synapsevampire

Using Destince records works. I am having a problem with Quantity. It is not doing quantity by Picture.operator

Thank You

Richard Hurd

How do I attach My Data? Send Me your Email?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top