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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • The order of custom fields in reports
Pages: [1]

Author Topic: The order of custom fields in reports  (Read 549 times)

trimtri

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.4.2
  • CMS version: Joomla! 1.5.23
  • PHP version: 5.2.15
The order of custom fields in reports
June 08, 2011, 06:43:25 am
I don't know why the order of custom fields in reports is not accordance with of the order in custom data? In reports, the custom fields seem to be ordered by date fields first and then text fields.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: The order of custom fields in reports
June 09, 2011, 11:41:28 am
They are being arranged by their DB id, they should use the custom field weights to arrange them on the report. This is a 'bug' / incomplete feature and the fix is very easy. I've filed an issue w/ a fix for 3.4.3 :

But you can patch your install by modifying line 1940 (or so, depending on your version) of CRM/Report/Form/Form.php:

Instead of:
ORDER BY cg.weight";

Should be:
ORDER BY cg.weight, cf.weight";
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • The order of custom fields in reports

This forum was archived on 2017-11-26.