En Crystal Report, imprima solo el primer registro en el grupo y déjelo sumable

I have a table that lists every task an operator completed during a day. This is gathered by a Shop Floor Control program. There is also a column that has the total hours worked that day, this field comes from their time punches. The table looks something like this:

Operator 1   Bestupid        0.5    8      5/12/1986

Operator 1   BeProductive    0.1    8      5/12/1986

Operator 1   Bestupidagain   3.2    8      5/12/1986

Operator 1   Belazy          0.7    8      5/13/1986

Operator 2   BetheBest       1.7    9.25   5/12/1986

I am trying to get an efficiency out of this by summing the process hours and comparing it to the hours worked. The problem is that when I do any kind of summary on the hours worked column it sums EVERY DETAIL LINE.

Yo he tratado:

If Previous (groupingfield) = (groupingfield) Then 
    HoursWorked = 0
Else
    HoursWorked = HoursWorked

I have tried a global three formula trick, but neither of the above leave me with a summable field, I get "A summary has been specified on a non-recurring field"

I currently use a global variable, reset in the group header, but not WhilePrintinganything. However it is missing some records and upon occasion I will get two hoursworked > 0 in the same group :(

¿Alguna idea?

I just want to clarify, I have three groups:

Groups: Work Center --> Operator --> Date

I can summarize the process hours across any group and that's fine. However, the hours worked prints on every detail line even though it really should only print once per Date. Therefore when I summarize the Hours Worked for an operator the total is WAY off because it is adding up 8hours for each entry instead of 8 hours for each day.

preguntado el 28 de agosto de 12 a las 13:08

How do you get the data? Are you using a command (query)? -

Yes it's a query that I wrote and not one automatically generated by Crystal, but the table itself is as above. With the total daily hours worked repeated on every single row -

1 Respuestas

Try grouping by the operators. Then create a running total for the process hours that sum for each record and reset on change of group. In the group footer you can display the running total and any other stats for that operator you care to.

Try another running total for the daily hours but pick maximum as the type of summary. Since all the records for the day will have the same hours work the maximum will be correct. Reset with the change of the date group and you should be good to go.

Respondido 28 ago 12, 14:08

So I actually have three groups already, the last two are operator and date. I'm not having problem with summing the process hours. I can sum the Process hours in any of the group footrs to get exactly what I want. However when I SUM the Hours worked for an operator it counds the hours worked on each detail line instead of for each day.... - Caleb Keller

Try another running total for the daily hours but pick maximum as the type of summary. Since all the records for the day will have the same hours work the maximum will be correct. Reset with the change of the date group and you should be good to go. If I understand the problem that is. - PMSawyer

This is confusing so I hope I type it out fine. For Process Orders I used a sum running total for each record, reset on the date group. For the hours worked I used a Max running total for each record, reset on the date group. The real trick came when i tried to go to the next group, which was per operator. here the Process Hours didn't change.... Sum Running total for each record, reset on the Operator group. However, the hours working running total changed to be a Sum running total for each date group, reset on the operator group. I just butchered that explanation, but it works. Thanks! - Caleb Keller

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.