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

Group of users 1

Status
Not open for further replies.

Crystalfire

Programmer
Jan 29, 2002
315
US
I have a report that counts the number of days a user has logged into an application within a given timespan. My existing report looks like this:

Username # of logons
User 1 15
User 2 15
User 3 12
User 4 3

The records shown above are displayed in the Group Footer section of the report while the detail section is suppressed. The # of logons is a count of the names in the detail section. How can I display the count of users that have the same count of logons?

This is want I want to display:

# of users # of logons
2 15
1 12
1 3

 
Depends upon where this count comes from.

We need to undetsand the data, not a current reports output which isn't what you want.

If the table has the counts, then group by the counts.

If you're building the counts, then you might use 2 arrays to store the values (user/logins) at the group level and display everything in the report footer.

-k
 
What version of CR are you using? If you are still using 8.5, then create a SQL expression like:

(select count(A.`name`) from Table A where
A.`username` = Table.`username` and
A.`date` >= {ts '2006-01-01 00:00:00'} and
A.`date` < {ts '2007-01-01 00:00:00'})

You would have to add your date criteria into the expression (I gave an example above), and the syntax/punctuation will vary based on your datasource and connectivity. If you can determine how to do this with your datasource, you can then group on this SQL expression and then insert a distinctcount on the user field at the group level.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top