wshcraft70
asked on
Crystal Reports with summary and sub-footer (continuation assistance required)
Currently:
However, Initially, I was instructed to calculate the average talk time.. However, what I really need is the TOTAL AVG TALK TIME for the ENTIRE group..
So I currently I'm able to calculate the avg on the change of each group..
But I need it to provide to AVG of the groups in the Footer..
Also, I don't want to display the details and just the footer. How can I do this? When suppresseing because I'm "WHILEPRINTINGRECORDS" everything goes to zero.. :(
Group Header:
WhilePrintingRecords;
Shared NumberVar RecCount;
Shared NumberVar DurationTotal;
RecCount := 0;
DurationTotal := 0;
Sub Report:
whileprintingrecords;
shared numbervar RecCount;
shared numbervar DurationTotal;
Local NumberVar CallDuration;
if({CallDetail.InternalNum }) >= 600 and ({CallDetail.InternalNum}) <700 then
CallDuration := {CallDetail.Duration}
else
CallDuration := 0;
if CallDuration > 0 then
RecCount := RecCount + 1;
DurationTotal := DurationTotal + CallDuration;
CallDuration
Group Footer:
WhilePrintingRecords;
Shared NumberVar RecCount;
Shared NumberVar DurationTotal;
If RecCount = 0 then
0
Else
DurationTotal / RecCount;
However, Initially, I was instructed to calculate the average talk time.. However, what I really need is the TOTAL AVG TALK TIME for the ENTIRE group..
So I currently I'm able to calculate the avg on the change of each group..
But I need it to provide to AVG of the groups in the Footer..
Also, I don't want to display the details and just the footer. How can I do this? When suppresseing because I'm "WHILEPRINTINGRECORDS" everything goes to zero.. :(
Group Header:
WhilePrintingRecords;
Shared NumberVar RecCount;
Shared NumberVar DurationTotal;
RecCount := 0;
DurationTotal := 0;
Sub Report:
whileprintingrecords;
shared numbervar RecCount;
shared numbervar DurationTotal;
Local NumberVar CallDuration;
if({CallDetail.InternalNum
CallDuration := {CallDetail.Duration}
else
CallDuration := 0;
if CallDuration > 0 then
RecCount := RecCount + 1;
DurationTotal := DurationTotal + CallDuration;
CallDuration
Group Footer:
WhilePrintingRecords;
Shared NumberVar RecCount;
Shared NumberVar DurationTotal;
If RecCount = 0 then
0
Else
DurationTotal / RecCount;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome. Glad I could help.
James
James
ASKER