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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Count Groups

Status
Not open for further replies.

The8thWonderJS

IS-IT--Management
Oct 28, 2005
9
US
My report has groups in it. They are grouped by date. It looks kind of like this :

10/28/05
-Ticket 555333
-ticket 365333
-ticket 258744

10/27/05
-ticket 32415
-ticket 35687
-ticket 52689

I want to count the number of groups in the report or the number of days in the report. How can I sum the number of groups? Thanks!
 
Hi,
Insert Grand Total as Distinct Count of the Date field.

That will also be the # of Groups..





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Here is a more accurate depiction of my report:

Assigned-To CaseID Resolved-Time Min
10/24/05
Joe Blo 52356 10/24/05 30
Joe Blo 45562 10/24/05 25
Joe Blo 21245 10/24/05 15
Joe Blo 42455 10/24/05 10
Joe Blo 78552 10/24/05 05

10/25/05
Joe Blo 52456 10/24/05 35
Joe Blo 44462 10/24/05 70


10/26/05
Joe Blo 25356 10/24/05 30
Joe Blo 45562 10/24/05 05
Joe Blo 44545 10/24/05 15
Joe Blo 42455 10/24/05 25
Joe Blo 71152 10/24/05 05
Joe Blo 21244 10/24/05 15
Joe Blo 42455 10/24/05 30
Joe Blo 78002 10/24/05 05
This report is displaying tickets for Joe Blo, the ticket number, the date, and the minutes that the ticket took, it is then grouped by the date field.

I need to figure out how to count the days. In this expample it should be three, but when I right click the {resolve-time} filed and do a distinc count it counts the total number of tickets which in this report is 15.
 
Add a formula to your detail section:

date({table.datetime})

Then insert a distinctcount on this. I'm guessing you are picking up a time portion of the field that is not being displayed.

-LB
 
Yes in my report ther is the exact time listed after the date, right down to the minute. So distinct count is seeing the time after the date and counting them individually. So I have to get rid of the time after the date then right?

10/24/2005 4:51PM
10/24/2005 4:56PM
10/24/2005 5:53PM
 
That's what the formula I suggested does. Just insert the summary on that.

-LB
 
Or change the datetime to a date and eliminate the problem.

This can and should be done at the database level, which if you can't create a View on the database. use a SQL Expression within Crystal.

Then group on the SQL Expression field instead and count accordingly.

-k
 
THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Both things worked, for now I am using the formula datedate({table.datetime})
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top