Print Page | Close Window

group conditions in count function

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=6687
Printed Date: 05 May 2024 at 3:44am


Topic: group conditions in count function
Posted By: rftd
Subject: group conditions in count function
Date Posted: 11 Jun 2009 at 2:42pm

Hi,

Im using the count function and im trying to group by time. Based on the crystal reports help, the format should be Count(fld, condfld, cond)
 
So, following this format, I created a formula field where I inputed:
 
count(some_field, start_time, 'for each minute')
 
However, when I do this, I am informed that "This group condition is not known". This comes as a surprise because the crystal reports documentation says that 'for each minute' is correct.
 
So, my question is this: how do I do the above count and group by minute?
 
Thanks in advance.



Replies:
Posted By: lockwelle
Date Posted: 12 Jun 2009 at 7:15am
do you have a grouping that is based on start_time?  the aggregate functions are based on a group, or if you leave it off, on all records, though I don't know how you would do this with the cond.
 
HTH


Posted By: DBlank
Date Posted: 12 Jun 2009 at 7:34am
try:
Count ({table.field}, {table.timefield}, "by minute")



Print Page | Close Window