Answers.Body: <p>No aggregation necessary.</p>
  
  <p>Under relationships add two relationships for activity contacts.  Select one to be the source and the other to be the target.</p>
  
  <p>Once you've got those relationships, you can add two display name fields.  One tied to the source relationship and one tied to the target relationship. </p>
  
  <p>Under filters add activity is deleted false, activity is current revision true.</p>
  
  <p>In the fields section, in the activity ID settings select filter repeats.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-11T04:52:59.300Z
Answers.Text: Thanks, Paul! I'm stuck on the last step, I don't see filter repeats in the Activity ID settings.
Answers.UserDisplayName: Kristine
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-11T10:13:50.693Z
Answers.Text: Actually I believe you need the Views Distinct module to filter on repeats.  Good module that I take for granted.
Answers.UserDisplayName: pmoz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-18T04:24:48.917Z
Answers.Text: Thanks, Paul! That worked perfectly. One thing to note for other users: You must have the pager as "Full" and display all items. If you don't, there will still be duplicates.
Answers.UserDisplayName: Kristine
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-10T16:53:02.890Z
Answers.LastActivityDate: 2015-11-10T17:22:02.177Z
Answers.LastEditDate: 2015-11-10T17:22:02.177Z
Answers.UserDisplayName: pmoz
Body: <p>On Drupal 7, how would you display a list of CiviCRM activities and show the two types of contacts (the activity related to the client and the user who created the activity)?</p>
  
  <p>Views is pretty tricky here. All the primary fields (Activity ID, Status, Type, Activity Date, Text Link) can be added without any problems. Each row in the table represents a unique activity entry. When it came to adding the names of the individuals for the client and person who created the activity, I'm having difficulty with it. I tried adding a relationship to "CiviCRM Activity Contacts: Activity Contact ID"; however, this will duplicate some of the activities in the data.</p>
  
  <ul>
  <li>Activity Assignees: Will not display the person who created the
  activity </li>
  <li>Activity Source: Displays the person who created the activity, but unclear how I would add the target contact (the client). Contact A/B doesn't work well.</li>
  <li>Activity Targets: Display the target contact (the client). Added a relationship successfully to display the user (person who created the activity), but one activity now appears in 9 rows.</li>
  </ul>
  
  <p>The only way I can think of displaying a list of unique activities is possibly aggregating (Views "use aggregation"? Table with aggregation options module to group Activity IDs?). Am I thinking about this too much?</p>
  
Tags: <activities><drupal-views>
Title: Activity Report in Views
ThreadText: # Activity Report in Views
  
  (Asked by: username_0 on 2015-11-10)
  
  On Drupal 7, how would you display a list of CiviCRM activities and show the two types of contacts (the activity related to the client and the user who created the activity)?
  
  Views is pretty tricky here. All the primary fields (Activity ID, Status, Type, Activity Date, Text Link) can be added without any problems. Each row in the table represents a unique activity entry. When it came to adding the names of the individuals for the client and person who created the activity, I'm having difficulty with it. I tried adding a relationship to "CiviCRM Activity Contacts: Activity Contact ID"; however, this will duplicate some of the activities in the data.
  
  * Activity Assignees: Will not display the person who created the
    activity
  * Activity Source: Displays the person who created the activity, but unclear how I would add the target contact (the client). Contact A/B doesn't work well.
  * Activity Targets: Display the target contact (the client). Added a relationship successfully to display the user (person who created the activity), but one activity now appears in 9 rows.
  
  The only way I can think of displaying a list of unique activities is possibly aggregating (Views "use aggregation"? Table with aggregation options module to group Activity IDs?). Am I thinking about this too much?
  
  **Tags:** activities, drupal-views
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-11-10. Score: 7 | Accepted answer
  
  No aggregation necessary.
  
  Under relationships add two relationships for activity contacts. Select one to be the source and the other to be the target.
  
  Once you've got those relationships, you can add two display name fields. One tied to the source relationship and one tied to the target relationship.
  
  Under filters add activity is deleted false, activity is current revision true.
  
  In the fields section, in the activity ID settings select filter repeats.
  
  > **Comments:**
  > **username_0**: Thanks, Paul! I'm stuck on the last step, I don't see filter repeats in the Activity ID settings.  
  > **username_1**: Actually I believe you need the Views Distinct module to filter on repeats.  Good module that I take for granted.  
  > **username_0**: Thanks, Paul! That worked perfectly. One thing to note for other users: You must have the pager as "Full" and display all items. If you don't, there will still be duplicates.  
  
  ---
  
  