Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Manual Running total issue Post Reply Post New Topic
Author Message
urbanmojo
Newbie
Newbie


Joined: 26 Sep 2012
Location: Canada
Online Status: Offline
Posts: 3
Quote urbanmojo Replybullet Topic: Manual Running total issue
    Posted: 22 Jul 2015 at 9:40am
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!

IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 22 Jul 2015 at 11:11am
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.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.