Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Return One Value Post Reply Post New Topic
Author Message
martbar
Newbie
Newbie


Joined: 04 Apr 2012
Location: United States
Online Status: Offline
Posts: 15
Quote martbar Replybullet Topic: Return One Value
     Posted: 05 Apr 2012 at 2:41am

I am new to Crystal and programming in general.

 

Here is what I have

 

//average formula

sum({@Total Van})/count({CostQuoteCosts.CostLane})

 

But in the design it shows the average value multiple times (for each CostQuote) so it looks like

 

$1760

$1760

$1760

$1760

$1760

$1760

$1760

$1760

 

How can I write the formula so that it only returns one value since the average is the same?

 

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 05 Apr 2012 at 5:09am
the formula you have will determine the average for the report...as there is no group qualifier.
 
with that said, there are at least 2 ways to skin the cat that come to mind.
1) place you formula in a footer...since a footer is only displayed once, the average will be as well.
2) check the option to supress if duplicated (Format object, Common tab)
 
Personally, I would go with option 1, again, since it would display the total for the report, I would place it in the report footer...but that's just me.
 
HTH
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