Tracking Logins In CR 8
Posted on 2001-07-06
I have a table that tracks the logins of users to a website. They login and the table captures there:
[UserID], [Logindate] (Userid is numeric & the Logindate field has both date and time in it).
For a project I need to count how many times a person logged in for a date range, Usually a monthly range, however there is a catch, if the person logs in again and its less than 60 minutes since the last time they logged in, it should only count as 1 login.
I figure I could group by [Userid] and sort the [Logindate] field in Ascending order and create a Formula field that has a "If Then Else" that looks at the current [Logindate]field in the record and compares it to the [Logindate] field in the previous record and if its less than 60 minutes make the Formula field = 0 and if not it = 1, then do a Sum on this field and I should have my problem solved! However how do I compare against a previous record? Is there a function for this?
P.S. I am using Crystal reports 8 But I also have access to CR 8.5 if needed!