Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Average duration Post Reply Post New Topic
Author Message
mimi
Newbie
Newbie
Avatar

Joined: 24 Oct 2007
Location: United States
Online Status: Offline
Posts: 1
Quote mimi Replybullet Topic: Average duration
    Posted: 24 Oct 2007 at 2:58pm
I am new to crystal reports, and this is probably a stupid question, but I'm stuck and need some help.
 
I have a one to many relationship table.
 
I am returning every record that was touched by a departmental group in the default record selection.  Within this departmental group, I am performing another group on order#.  For each unique order, I am calculating the duration of that order.  I need to get an average duration of all orders to be reported at the departmental level of the report, but cannot seem to figure out the proper way to calculate the average.
 
My report is grouped by Department and then order #.
 
Here is an example and the things I have tried.
 
I tried using the Insert Summary function on the formula I created, and I don't understand how it generates the amount, but it is not the correct amount.    Ex.   Dept 1000
                                           Order #         Duration
                                           1111                .63
                                           1112              2.22
                                           1113              1.91
This should total up to 4.76 and then divided by 3 the average duration should be 1.59   -  Using the Insert Summary function, it gives me 1.35.
 
I tried to sum the duration amount for each order number within a formula and inserted in the department group section of the report, and it will sum up to 5.39.  This is because there were actually 2 records returned for order # 1111 and it is added that duration time twice.  So the average will calculate to 1.80, as oppose to the expected result.
 
Does anyone know how I can accomplish this?
Mimi
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.