Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Formulas to Catagorize Data and Put into a Chart Post Reply Post New Topic
<< Prev Page  of 3
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Mar 2013 at 4:02am
first, let me make sure I understand your issue. YO have ione row of data per travel taime. This row needs to be counted twice. Once as thw whole time under the category of travel anbd once as half the time under within the billable times, and you need them both to appear in a crosstab, correct?
IP IP Logged
chadbrewyet
Newbie
Newbie


Joined: 26 Oct 2010
Online Status: Offline
Posts: 22
Quote chadbrewyet Replybullet Posted: 15 Mar 2013 at 6:42am
That is correct for the most part. It doesn't need to be counted twice but it does need to be designated in 2 different categories.   Each Time Log will have a different "reason" and if the reason is "Travel", the time needs to be counted at full value towards Travel Time and half value towards Billable Time.

So, let's say a tech enters the following logs:

Key    Reason     Time
1      Travel     0h 30m
2      Service    4h 0m
3      Lunch      1h 0m
4      Travel     1h 0m
5      Contract   3h 30m

The tech would be credited for 1h30m of Travel Time, 3h30m of Contract Time, 1h for Lunch, and 4h45m of Billable(Service) Time.

I found out that the Stored Procedures are pretty well locked down but I can add views within the database if that will help.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Mar 2013 at 6:52am

In order to have it appear in a single chart you need to get the travel time intot he report twice, once as travel with the table time value and once as travel (billable) with time value*.5.If you dont need these to appear in the cahrt you can use two formulas to get seperate values.

billable values would be something like
if field in (service,contract) then value else if field=travel then value*.5 else 0
 
for travel only
then if field=travel then value
 
for lunch
if field = lunch then value
 
now you can sum each of these and get 3 seperate values for billing lunch and travel
 
will that work?
IP IP Logged
chadbrewyet
Newbie
Newbie


Joined: 26 Oct 2010
Online Status: Offline
Posts: 22
Quote chadbrewyet Replybullet Posted: 15 Mar 2013 at 9:59am
I think I'll need to go with bringing the travel logs in as 2 instances because I'll need them in the charts and cross-tabs. Would I just add another instance of the log entry in the details and conditionally suppress them or would I have to use groups?

Thanks. You have been a big help.
IP IP Logged
<< Prev Page  of 3
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.016 seconds.