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) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Making report columns sortable
Pages: [1]

Author Topic: Making report columns sortable  (Read 8136 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Making report columns sortable
June 25, 2012, 07:59:22 pm
In a custom CiviReport, is it possible to allow the user to sort the report by clicking the column heading? Just like the current behavior in searches?

On a related note, why are all the column headings click-able in the built-in reports even though nothing happens when they are clicked? This behavior is confusing to new users, who when their cursor changes when they mouse over the column headings think that they should be able to click to sort.



Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

nickholden

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.4
Re: Making report columns sortable
March 12, 2013, 08:23:42 am
Did anyone have answers for this? I'm trying to make sense of the same questions. Other elements of CiviCRM seem to use datatables or jQuery to deliver sortable column headers, but not CiviReport. Can it be done?

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Making report columns sortable
March 12, 2013, 10:11:53 pm
In the report criteria section, "Donor Report (Detail)" for example, you should see a "Order by Columns" section, which allows user sort by one/multiple columns, provided report code has 'order_bys' specified.

Making report sort by clicking column heading doesn't work currently, and doesn't have any code written to address it. Agree that the behaviour should be fixed to remove the confusion.

Given that order_bys does work now if we could just pickup order-bys from url, it won't be too hard to make column header click to make report sortable. Of course this won't be ajax behaviour to begin with.

Using datatables / jquery would require more effort to make report sortable under the grid making sure that whole report result is sorted and not just the current-view.

Patches for any of above is most welcome.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

The Next Wave

  • I post occasionally
  • **
  • Posts: 111
  • Karma: -9
  • I'm just here to change the world.
  • CiviCRM version: 4.4.4
  • CMS version: Wordpress 3.8.1
  • MySQL version: 5.1.72-cll
  • PHP version: 5.4.25
Re: Making report columns sortable
July 10, 2013, 04:06:25 am
How do we change the "Order bys" fields?
On one civi install it seems to order by street name and number (but not by even odd properly)
yet- on another- it seems to be mapping an empty field - and doesn't order at all.
We're totally miffed by this-
thought it was that the contact address was mapping to (primary) instead of (home) but- that seems to make no difference.
We have a field St address and st number it wants Street Address and Street Number in the order by-
HELP?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Making report columns sortable

This forum was archived on 2017-11-26.