Answers.Body: <p>How a report is sorted is defined in the Report Criteria. Depending on what data the report looks at, you can sort of different criteria. It's usually called something like "Order by columns" and appears below the Selected Columns. Reports generally sort in date order.</p>
  
  <p>If you want to play about with the data, the easiest thing to do is export to CSV and save in Excel so you can sort, filter and build graphical representation of your data as you wish.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-24T11:44:53.163Z
Answers.LastActivityDate: 2015-07-24T11:44:53.163Z
Answers.UserDisplayName: Heather O.
Answers.Body: <p>Something I did once was to apply DataTables to the output of a CiviReport, adding the necessary JS in the template. That let me sort by whatever column. It was a bit of a hack though. Not a good idea if your report has an alterDisplay function (eg. to make a contact name into a link to that contact). I also had to override CiviReport's limit() function so DataTables would see all the rows. But now I understand CiviReport a bit better as to what I can put in the configuration array.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-24T12:13:05.137Z
Answers.LastActivityDate: 2015-07-24T12:13:05.137Z
Answers.UserDisplayName: DaveFF
Answers.Body: <p>I can't explain why the Column Headers trigger a 'mouseover' action that makes it look like you should be able to click to sort. But if that is 'how it is' and if you are using Drupal, it can be pretty quick to fire up a View that gives you the same columns and which is click sortable.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-24T02:58:25.333Z
Answers.LastActivityDate: 2015-07-24T02:58:25.333Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>I'm reasonably sure that this is a feature available in CiviCRM 4.7 (the upcoming release, in 2-3 months) - I'm pretty sure that during the code sprint in Colorado, the DataTables plugin was applied to tables to address this.  I haven't seen it in action though!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-29T15:00:49.720Z
Answers.Text: This was discussed at the sprint, but unfortunately is complicated because of the some of the gotchas that DaveFF describes above.  DataTables on CiviCRM Reports won't be included in 4.7.
Answers.UserDisplayName: Joseph Lacey
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-26T18:52:40.133Z
Answers.LastActivityDate: 2015-07-26T18:52:40.133Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I'm evaluating CiviCRM for my organization and noticed something about the demo report tables that concerns me. Hopefully I'm just missing something. Do I have to create a new report or modify an existing one in order to change the sort order of a field? For example, I'd like to view the Contribution Details report and quickly sort it by amount, but when I click on the amount column header, nothing happens. Why can't I sort by amount by clicking on its column heading? Did CiviCRM used to have that capability but there was a bug that caused problems, so you took it out?</p>
  
Tags: <civireport><evaluating-civicrm>
Title: Sorting by clicking on column headers
ThreadText: # Sorting by clicking on column headers
  
  (Asked by: username_0 on 2015-07-24)
  
  I'm evaluating CiviCRM for my organization and noticed something about the demo report tables that concerns me. Hopefully I'm just missing something. Do I have to create a new report or modify an existing one in order to change the sort order of a field? For example, I'd like to view the Contribution Details report and quickly sort it by amount, but when I click on the amount column header, nothing happens. Why can't I sort by amount by clicking on its column heading? Did CiviCRM used to have that capability but there was a bug that caused problems, so you took it out?
  
  **Tags:** civireport, evaluating-civicrm
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_1 on 2015-07-24. Score: 5
  
  How a report is sorted is defined in the Report Criteria. Depending on what data the report looks at, you can sort of different criteria. It's usually called something like "Order by columns" and appears below the Selected Columns. Reports generally sort in date order.
  
  If you want to play about with the data, the easiest thing to do is export to CSV and save in Excel so you can sort, filter and build graphical representation of your data as you wish.
  
  
  ---
  
  ### Answer by username_2 on 2015-07-24. Score: 3
  
  Something I did once was to apply DataTables to the output of a CiviReport, adding the necessary JS in the template. That let me sort by whatever column. It was a bit of a hack though. Not a good idea if your report has an alterDisplay function (eg. to make a contact name into a link to that contact). I also had to override CiviReport's limit() function so DataTables would see all the rows. But now I understand CiviReport a bit better as to what I can put in the configuration array.
  
  
  ---
  
  ### Answer by username_3 on 2015-07-24. Score: 2
  
  I can't explain why the Column Headers trigger a 'mouseover' action that makes it look like you should be able to click to sort. But if that is 'how it is' and if you are using Drupal, it can be pretty quick to fire up a View that gives you the same columns and which is click sortable.
  
  
  ---
  
  ### Answer by username_4 on 2015-07-26. Score: 0
  
  I'm reasonably sure that this is a feature available in CiviCRM 4.7 (the upcoming release, in 2-3 months) - I'm pretty sure that during the code sprint in Colorado, the DataTables plugin was applied to tables to address this. I haven't seen it in action though!
  
  > **Comments:**
  > **username_5**: This was discussed at the sprint, but unfortunately is complicated because of the some of the gotchas that username_2 describes above.  DataTables on CiviCRM Reports won't be included in 4.7.  
  
  ---
  
  