Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: CountIF, Mean Post Reply Post New Topic
Author Message
Gr1m
Newbie
Newbie
Avatar

Joined: 15 Feb 2008
Location: South Africa
Online Status: Offline
Posts: 3
Quote Gr1m Replybullet Topic: CountIF, Mean
     Posted: 15 Feb 2008 at 5:07am
Hi guys,

Ive got a report drawing data from a table in which all fields are varchar (I cannot change this). However, some of these fields contain numeric or boolean values only, even though they are defined as text.

So is there some way to get the summary fields to calculate mean or a countIf type thing, even if the field is of text type?

Thanx in advance

Ed Dead
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 15 Feb 2008 at 5:49am
Hi,
 
Create two formulas first to convert text to number
 
formula1
 
tonumber({tablename.field}
 
then use that formula in another one
 
formula 2
 
Median(formula1)
 
 
 
Cheers
Rahul
 
IP IP Logged
Gr1m
Newbie
Newbie
Avatar

Joined: 15 Feb 2008
Location: South Africa
Online Status: Offline
Posts: 3
Quote Gr1m Replybullet Posted: 15 Feb 2008 at 5:55am
Where can I do this? I cant find any place where I can set a formula for the fields to be displayed. I can only find where I can set formulas for the selection.
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 15 Feb 2008 at 6:53am

Hi,

 
Open the report ,for to View Menu..... then select Field Explorer where you will see X+1 Formula Fields select
 
 right click select New....
 
You can also select Report from the Menu
 
then formula Workshop
 
once you open that
 
 Select the New from the top menu above....
 
or on left you will see Formula Fields right click select new enter the name of the formula and enter the code...........
 
 
Cheers
Rahul


Edited by rahulwalawalkar - 15 Feb 2008 at 6:54am
IP IP Logged
Gr1m
Newbie
Newbie
Avatar

Joined: 15 Feb 2008
Location: South Africa
Online Status: Offline
Posts: 3
Quote Gr1m Replybullet Posted: 18 Feb 2008 at 3:58am
I thank you. Helped nicely. :)
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