Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Calculate Avergage Based on Parameter in footer Post Reply Post New Topic
Author Message
kitster100
Newbie
Newbie


Joined: 19 Jul 2011
Online Status: Offline
Posts: 18
Quote kitster100 Replybullet Topic: Calculate Avergage Based on Parameter in footer
     Posted: 19 Jul 2011 at 11:52am
OK, I have a calculated time average, based on detail data. I want to display two or more different average fields in the report footer, based on a text field in the record. In other words, I want an average number if the event occurred at location one, and a DIFFERENT average displayed if this event occurred at location two.
 So, in the footer I want:

Location one average: xx minutes
Location two average: yy minutes.

 I have played with the group expert, I have inserted IF statements, so that the records will be filtered based on location, and no results.

 Any suggestions would be appreciated.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Jul 2011 at 11:57am

if I understand you correctly use 2 running totals

name = location 1 avg
field to summarize= the item you want averaged based on location1 (xx minutes)
type of summary=average
evaluate=use a formula
table.locationfield = 'location1'
reset=never
place in report footer
 
name = location 2 avg
field to summarize= the item you want averaged based on location2 (yy minutes)
type of summary=average
evaluate=use a formula
table.locationfield = 'location2'
reset=never
place in report footer


Edited by DBlank - 19 Jul 2011 at 11:58am
IP IP Logged
kitster100
Newbie
Newbie


Joined: 19 Jul 2011
Online Status: Offline
Posts: 18
Quote kitster100 Replybullet Posted: 19 Jul 2011 at 12:22pm
Hi D:
 Unfortunately the formula I'm using (based on a calc of two other formulas) does not show up in the "Create Running Total Field" interface. So I cannot place it in the "Field to Summarize" box. Do you know how I can get my formula to show up?
 Also, you say to choose: "Evaluate=use a formula." What form would that formula take? 

 Than you very much in advance.
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