|
Hi:
I'm trying to assign a manual running total in the following situation. Let's assume the records in Crystal are like this:
Agent Time Event Bob 8:03:04 Comes Jack 8:04:05 Comes Bob 8:05:06 Goes Jill 8:06:03 Comes Jack 8:07:05 Goes Jill 8:09:33 Goes
Subreport: "Time Here" Bob: 0:02:02 Jack: 0:03:00 Jill: 0:03:30
In this case I will have to create manual running totals. I can't create a "BobTime", "JackTime" etc. variable since I will have no idea how many agents--could be 3 or 50. I assume I would have to use an array or something. What is the best way to do this? (With codes samples) I am using Crystal Reports 2008, and have no access to do anything on the database side.
Thanks!
|
|
First off, do you need to see the details? If no, then group by agent. If yes, then you may be able to do an array (limit of 100 items). Since you are doing a time difference, you probably will need to do a manual running total.
GH: formula, Initialize running total (i.e, shared total :=0;) and any other variables needed.
Detail: formula, calc difference and add to previous value, Since there are comes and goes events, probably will need some logic to only calc when you have a goes event (storing comes event time in shared variable).
GF: Display total
I hope this helps.
|