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

need to display company based off of latest activity 1

Status
Not open for further replies.

andie18

MIS
Aug 14, 2001
198
US
I am writing a report in Crystal 8.5 developer that is suppose to display the company/contact based off of lastest activity entered and the user that did it.

an example of what I need:

area: Need To assign
SalesRep: Joe
ABC company Fred Jone 10/1/2003

an example of what I am getting instead

area: Need to assign
SalesRep: Joe
ABC company Fred Jone 10/1/2003
ABC company Fred Jone 9/3/2002

SalesRep: Gina
ABC Company Fred Jone 9/15/2002

so.. this is what I did. - it's a goldmine SQL backend btw....

the report links contact1 (where company name/contact name is stored) and conthist (where the history lives as well as username). I linked it by accountno - conthist.accountno to contact1.accountno

I then created 2 groups:

group #1 - is off of a geographical sorting field
group #2 - is off of the userid

in the details section I have contact1.company, contact1.contact and conthist.ondate

in the select expert, i have it selecting records that say "need to assign" and "NC" on the field that is group #1

I then sorted my report by contact1.key5 A (that is the group #1 field), contact1.userid A, conthist.ondate D

The report does display the latest record first, but it also displays the second newest record and so on. then if different users entered things on these accounts, the report then displays the latest entry for that user. I know that I totally screwed up the sorting or record selection, but am cluefree as to what I did

any ideas? TIA for any help
 
Sort the date in ascending order and display your information in the footing section of the userid group. Suppress the detail section.

MrBill
 
You should also be able to use Group Selection Criteria.

Goto the Report Menu and choose 'Edit Selection Formula' and then under that Choose Group.

In the Group Selection Formula Editor, you could tell it to select only contact dates that are equal to the Maximum contact date (which would be the most recent) for the employee group.

Example: {conthist.ondate} = Maximum({conthist.ondate},{contact1.userid})

Since your are grouping on UserID, this would return only the most recent contact date record (company name, company contact etc...) within each employee grouping.

Just an idea, hope this helps.

MRudolph
 
thanks that did cut down the list quite a bit but how do I get rid of the other users? Meaning I just want the very last person who touched it.
 
I stumbled into my own answer.

thanks for the help!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top