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) »
  • Help with alphabetizing/sorting a membership report
Pages: [1]

Author Topic: Help with alphabetizing/sorting a membership report  (Read 924 times)

LMKWeb

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.2.6
  • CMS version: Joomla 2.5.8
Help with alphabetizing/sorting a membership report
October 10, 2011, 01:17:22 pm
I'm working on a membership report that pulls out start date, end date, member since, status, and name. I've got the report almost where I want it, except for one small detail:

How do I sort it? There is no visible sorting to the report after it's been run. Attempting to sort by clicking on the column headings only sorts for that particular page rather than the entire set, and there are over 100 results. When exporting as a CSV, the dates are unrecognizable to Excel (YYYYMMDD) so it doesn't sort them properly, either. Is there any way to change the date format?

Ideally, I'd like the option to sort by name or any of the date columns, since we run this report for a variety of reasons.

This report is the Membership Report (Detail). Currently running CiviCRM 3.3.5 on Joomla 1.5.23. We will be upgrading to the latest Joomla & CiviCRM releases over the next two months, but we need this report working well now.

Thanks in advance for any assistance!

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Help with alphabetizing/sorting a membership report
October 10, 2011, 04:20:01 pm
There was a problem with the sorting being limited to only the results on a single page (rather than the entire result set which could be dozens of pages).  This is going to be resolved in a future version of CiviCRM.

In the meantime, I suggest you take one of two approaches:

1. Edit the .php of the report and set a SORT BY clause in your MySQL query.  This is rather easily done if you google it on MySQL.org or some other place like Stack Overflow.

2. Export the results of the report and sort in Excel

Sorry it is not easier but that's what I'd do.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

LMKWeb

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.2.6
  • CMS version: Joomla 2.5.8
Re: Help with alphabetizing/sorting a membership report
October 11, 2011, 01:21:56 pm
Hi Stoob - Thanks for the reply! I'm a designer rather than a developer, but I'll see if I can figure this out. When adding a SORT BY clause to the query, are you limited to sorting by only one option? I'm not entirely clear on how that modifies what the user sees when they go to run a report.

Also, is there any way to change the date format in the CSV file?

Thanks!

TwoMice

  • I post frequently
  • ***
  • Posts: 214
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
Re: Help with alphabetizing/sorting a membership report
October 12, 2011, 11:55:36 am
Hi sh0rtchica,

This won't be useful until you upgrade, but for future reference (for you and other users), dynamic report sorting is available as of version 3.4.5/4.0.5.  See this page for notes on how it works
http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviReport+structure+and+customization (search the page for order_bys).

- Allen
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Help with alphabetizing/sorting a membership report

This forum was archived on 2017-11-26.