Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using DistinctCount in a Cross Tab

Status
Not open for further replies.

uachap

Programmer
Mar 9, 2004
11
0
0
US
I am trying to create a cross-tab report that will only print data if employee data exists for 5 consecutive days. So I'm trying to use the distinctcount function with this format:

DistinctCount({table.DATE},{table.PERSONID}) => 5

I'm doing this in the selection criteria > group function.

When I save the formula, I get the error:

"The summary / running total field could not be created" with no other information.

We're using Crystal 8 on SQL Server 2000.

Any help would be appreciated.
 
I would try a different approach to resolve this problem.
I would create an SQL or Stored Procedure that would weed out the < 5 elements.

Try this, if you need help let me know!

Regards

Wallie12
 
You probably have not yet inserted a group on the {table.personID} field. But, using a group select will not limit the crosstab display to those with only five or more dates unless this is a crosstab you are displaying in the personID group header. In the report header, all groups would still be displayed.

-LB
 
After I added the appropriate groups, I was able to get the distinctcount function to work correctly. thank you so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top