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?