Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Fornula based on detail level results Post Reply Post New Topic
Author Message
curiousninja
Newbie
Newbie


Joined: 16 Aug 2012
Online Status: Offline
Posts: 1
Quote curiousninja Replybullet Topic: Fornula based on detail level results
     Posted: 17 Aug 2012 at 1:00am
Hi all
 
I'm extremely new to Crystal and am starting on version XI.
 
I have a data that I am taking from a reource planning system. The system allows us to track staff's whereabouts and the activities they have planned for the day.
 
The data that I have is a start and end time of the tasks for each person displayed as seconds on the 24hr clock. So if a tast was due to start at 08:00 that would be 28800 seconds from midnight. I calculate the duration of the task by simply taking the end time from the start time.
 
All of the information below is being gathered on the Detail level.
 
Task   Start Time (seconds)    End Time (seconds)      Duration
1         34200                              39600                             5400
2         37500                              38400                             900
3         39600                              41400                             1800
4         41400                              48600                             7200
5         43200                              45000                             1800
6         48600                              50400                             1800
 
Logically you would expect this system not to start a new task until the previous task has finished however this is not the case.
 
My problem is that task overlap as can be seen with task 1 & 2, 4 & 5. This means that the duration of task 1 & 4 are not correct because there was a time during these tasks when the person was really doing tasks 2 & 5
    
I want to be able to identify if any task falls within the timeframe of another and if it does remove the duration of the secondary task from the original. 
 
Any help at all would be greatly appreciated. I just don't have the skills or knowledge at this moment to know where to start or if its even possible.
 
many thanks
     
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Aug 2012 at 3:54am
look int he help at using either the
next()
previous()
functions.
However you will be limited to only checking one row in either direction
you can create a value to put in place of the duration of it does not correct or alter the original data (crystal does not do that).
also the result cannot be summed manually, it would have to be summed using formulas with shared variables.
IP IP Logged
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