CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • sorting and section headers for reports
Pages: [1]

Author Topic: sorting and section headers for reports  (Read 2135 times)

TwoMice

  • I post frequently
  • ***
  • Posts: 214
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
sorting and section headers for reports
October 23, 2010, 09:34:11 pm
It's great to see we're using jQuery DataTables sorting for report output now (i.e., instant header-click sorting by column).

It would also be nice to build in some configurable sorting options that would support, say, multi-column sorting.   It would be even cooler to add in support for section headers with totals (which would depend on the sorting to work properly).

This would let us turn something like this (sorted by size only, in one long list)

+-------------------------+
| SIZE   | ID     | FRUIT |
+--------+--------+-------+
| Large  | 1      | kiwi  |
+--------+--------+-------+
| Large  | 3      | apple |
+--------+--------+-------+
| Small  | 4      | plum  |
+--------+--------+-------+
| Small  | 8      | kiwi  |
+--------+--------+-------+
| Small  | 11     | apple |
+--------+--------+-------+

into something like this (sorted by size and fruit, and sectioned by size with total counts per section):

+-----------------+
| SIZE: Large (2) |
+-----------------+
| ID     | FRUIT  |
+--------+--------+
| 3      | apple  |
+--------+--------+
| 1      | kiwi   |
+-----------------+
| Size: Small (3) |
+-----------------+
| ID     | FRUIT  |
+-----------------+
| 11     | apple  |
+--------+--------+
| 8      | kiwi   |
+--------+--------+
| 4      | plum   |
+--------+--------+


In a not-too-recent thread, Lobo guessed 40-50 hours for getting generalized sorting into the reporting framework.  We may be interested in building and submitting a patch for the sorting feature, and possibly something in support of section headers as well. 

Does anyone want to offer their thoughts on the value of these features?  And possibly any pointers on potential headaches to watch out for?

Thanks,
TM
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

TwoMice

  • I post frequently
  • ***
  • Posts: 214
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
Re: sorting and section headers for reports
October 25, 2010, 02:35:55 pm
For reference, this is moving forward, as explained in this blog post:
http://blog.civicrm.org/blogs/allenshaw/adding-sort-columns-reports
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • sorting and section headers for reports

This forum was archived on 2017-11-26.