Hello all. I am working on a SalesLogix Activity / History Report. This report will print the most recent History record (what has been done with a client) as well as the next Activity record (the next thing to be done with that client). No problems with that part of the project. Where the problem arises is that my client wants the last History record to print if there are no planned Activities and vice versa: print the next Activity record if there is no History. At the end of the day, I was looking at how to do that and (long day!) ran into a roadblock. I have some ideas but am here to see if someone else has done that kind of report.
----- ----- ----- ----- ----- -----
Report Layout:
This is the Table Structure in my report:
ACCOUNT
CONTACT
HISTORY
HISTORY_PICKLIST (Alias of PICKLIST used with HISTORY Table)
ACTIVITY
ACTIVITY_PICKLIST (Alias of PICKLIST used with ACTIVITY Table)
I have the following links:
ACCOUNT.AccountID ROJ CONTACT.AccountID (need all contacts of each ACCOUNT)
CONTACT.ContactID = HISTORY.ContactID (Tried ROJ here but it didn't work)
HISTORY.Type = HISTORY_PICKLIST.ID
CONTACT.ContactID = ACTIVITY.ContactID (Also tried ROJ here with same result...)
ACTIVITY.Type = ACTIVITY_PICKLIST.ID
Groups:
G1: ACCOUNT.SecCodeID
G2: ACCOUNT.Account
G3: Contact Name (Formula = Last Name, First Name)
Sections:
GH1: Visible
GH2: Suppressed
GH3: Suppressed if Contact Name formula is NULL (ie if there is an Activity with an Account but not a Contact); except for ACCOUNT.SecCodeID, all fields on the report are actually placed in GH3: this allowed me to rapidly show only the last History record and the next Activity Record - when placed in the detail lines, all History & Activity records were shown on the report.
All other sections are also suppressed...
Fields:[tt]
GH3a: G2 G3 HISTORY.CompletedDate ACTIVITY.StartDate
GH3b: HISTORY.Text ACTIVITY.Text
GH3c: HISTORY.Description ACTIVITY.Description
[/tt]
G2 = Group2 Name & G3 = Group3 Name
Sorts
HISTORY.CompletedDate (DESC)
ACTIVITY.StartDate (ASC)
----- ----- ----- ----- ----- -----
As noted before, the final part of this report is to print the last History record if there are no planned Activities and print the next Activity record if there is no History. I thought of 2 possible solutions:
a. Putting the relevant fields into a String Array Variable, then printing those elements.
b. A subreport for History and another SR for Activities.
So my questions are:
1. Has anyone done a report like this. If so, how did you solve this problem?
2. Any other solutions?
Thanks very much,
John
John Marrett
Crystal Reports Trainer & Consultant
----- ----- ----- ----- ----- -----
Report Layout:
This is the Table Structure in my report:
ACCOUNT
CONTACT
HISTORY
HISTORY_PICKLIST (Alias of PICKLIST used with HISTORY Table)
ACTIVITY
ACTIVITY_PICKLIST (Alias of PICKLIST used with ACTIVITY Table)
I have the following links:
ACCOUNT.AccountID ROJ CONTACT.AccountID (need all contacts of each ACCOUNT)
CONTACT.ContactID = HISTORY.ContactID (Tried ROJ here but it didn't work)
HISTORY.Type = HISTORY_PICKLIST.ID
CONTACT.ContactID = ACTIVITY.ContactID (Also tried ROJ here with same result...)
ACTIVITY.Type = ACTIVITY_PICKLIST.ID
Groups:
G1: ACCOUNT.SecCodeID
G2: ACCOUNT.Account
G3: Contact Name (Formula = Last Name, First Name)
Sections:
GH1: Visible
GH2: Suppressed
GH3: Suppressed if Contact Name formula is NULL (ie if there is an Activity with an Account but not a Contact); except for ACCOUNT.SecCodeID, all fields on the report are actually placed in GH3: this allowed me to rapidly show only the last History record and the next Activity Record - when placed in the detail lines, all History & Activity records were shown on the report.
All other sections are also suppressed...
Fields:[tt]
GH3a: G2 G3 HISTORY.CompletedDate ACTIVITY.StartDate
GH3b: HISTORY.Text ACTIVITY.Text
GH3c: HISTORY.Description ACTIVITY.Description
[/tt]
G2 = Group2 Name & G3 = Group3 Name
Sorts
HISTORY.CompletedDate (DESC)
ACTIVITY.StartDate (ASC)
----- ----- ----- ----- ----- -----
As noted before, the final part of this report is to print the last History record if there are no planned Activities and print the next Activity record if there is no History. I thought of 2 possible solutions:
a. Putting the relevant fields into a String Array Variable, then printing those elements.
b. A subreport for History and another SR for Activities.
So my questions are:
1. Has anyone done a report like this. If so, how did you solve this problem?
2. Any other solutions?
Thanks very much,
John
John Marrett
Crystal Reports Trainer & Consultant