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 get only the new users to show in my report?

Status
Not open for further replies.

JessicaD

Technical User
Mar 11, 2009
4
US
Crystal 10
Access 2003

I have an Access db that contains user hit info. I want to create a report that shows only the new users since last month. I created a report that lists the current month's user info. This is the SQL query in Crystal 10:

Code:
 SELECT `allkbusers_OLD`.`USERID`, `allkbusers_OLD`.`HIT_TIME`, 
`RPN_data`.`CustomerName`, `RPN_data`.`LastName`, `RPN_data`.`FirstName`, 
`RPN_data`.`Email`
 FROM   `RPN_data` `RPN_data` INNER JOIN `allkbusers_OLD` `allkbusers_OLD` 
ON `RPN_data`.`ContactID`=`allkbusers_OLD`.`USERID`
 WHERE  (`allkbusers_OLD`.`HIT_TIME`>=#2008-10-01 00:00:00# AND 
`allkbusers_OLD`.`HIT_TIME`<#2008-11-01 00:00:00#)
 ORDER BY `allkbusers_OLD`.`USERID`, `RPN_data`.`LastName`

I tried to add a second date range after the first with "AND NOT (`allkbusers_OLD`.`HIT_TIME`>=#2008-9-01 00:00:00# AND `allkbusers_OLD`.`HIT_TIME`<#2008-10-01 00:00:00#)" in it, but the results were the same. I also tried using the Formula Editor to see if I could just use LastFullMonth in the selection criteria, but Crystal didn't like that.

Does anyone have any suggestions about how to compare this month's data with last month's data and then only show the difference between the two (which would be the new users)?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top