Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Count Selected Field Items Post Reply Post New Topic
Author Message
FastTaxi
Newbie
Newbie
Avatar

Joined: 21 Jul 2007
Location: Australia
Online Status: Offline
Posts: 7
Quote FastTaxi Replybullet Topic: Count Selected Field Items
    Posted: 21 Jul 2007 at 9:49pm
Hi, I have a field that contains string values in a format such as "00:00", what I need to do is pluck out selected sections and count them. Example there may be 15 different values between "00:00" and "00:59", Select expert only allows me to do this once. I need different counts for every hour of the day. I need to set up 24 formulas that range >"00:00" and <"00:59" then  > "01:00" and < "01:59" and so on. No matter what syntax I use i can't get it to work.
 
 
FastTaxi
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 21 Jul 2007 at 10:31pm
Can you post some examples of the syntax you tried?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
FastTaxi
Newbie
Newbie
Avatar

Joined: 21 Jul 2007
Location: Australia
Online Status: Offline
Posts: 7
Quote FastTaxi Replybullet Posted: 22 Jul 2007 at 2:24am

the Tablename is BK190707 and the field is PICKUPTIME

this syntax - count ({BK190707.PICKUPTIME)will count all the records but I need to break it down-  The following is just some of the many combinations I have tried, that dont work
 
if BK190707.PICKUPTIME} >"00:00" and < "00:00" then
count ({BK190707.PICKUPTIME} in "00:00" to "00:59")
endif
also tried
count ({BK190707.PICKUPTIME} in "00:00" to "00:59")
also tried
dim trial as boolean
trial = true
if {BK190707.PICKUPTIME} > "00:59" = true then
formula = count({BK190707.PICKUPTIME}) end if
Ive been stuck on this problem for days
FastTaxi
IP IP Logged
FastTaxi
Newbie
Newbie
Avatar

Joined: 21 Jul 2007
Location: Australia
Online Status: Offline
Posts: 7
Quote FastTaxi Replybullet Posted: 22 Jul 2007 at 2:28am
slight mistake with 1st example it is
if BK190707.PICKUPTIME} >"00:00" and < "00:59" then
count ({BK190707.PICKUPTIME} in "00:00" to "00:59")
endif
FastTaxi
IP IP Logged
FastTaxi
Newbie
Newbie
Avatar

Joined: 21 Jul 2007
Location: Australia
Online Status: Offline
Posts: 7
Quote FastTaxi Replybullet Posted: 23 Jul 2007 at 2:47am

Clearly Crystal Reports is not able to count the number of grouped items in field, there must be better software on the market

thankyou all
FastTaxi
IP IP Logged
saoco77
Senior Member
Senior Member


Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
Quote saoco77 Replybullet Posted: 23 Jul 2007 at 6:35am
I think you should be able to do this in two parts.

Try setting up a group based on BK190707.PICKUPTIME. Create your group heirarchy based on a formula and group on this formula or use the specified order option to create the hourly interval breakdown you are targeting.

Next set up the count formula to count pickup times based on that group.

count({BK190707.PICKUPTIME},{BK190707.PICKUPTIME})

I think something along these lines should work.
IP IP Logged
FastTaxi
Newbie
Newbie
Avatar

Joined: 21 Jul 2007
Location: Australia
Online Status: Offline
Posts: 7
Quote FastTaxi Replybullet Posted: 23 Jul 2007 at 8:30pm
Thanks Mate, I'll try anything
FastTaxi
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.