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 CiviContribute (Moderator: Donald Lobo) »
  • Searching Aggregate Contributions
Pages: [1]

Author Topic: Searching Aggregate Contributions  (Read 1874 times)

mheadd

  • Guest
Searching Aggregate Contributions
December 05, 2007, 02:57:22 pm
Is there any way to search contacts by aggregate contribution amount?  I can't seem to find this functionality in CiviCRM (currently using version 1.8.11536).

I'd like to be able to extract a list of contacts that have contributed over a certain threshold in aggregate contributions.  Using the advanced search feature seems to restrict the search criteria to individual contributions.

Alternatively, is there any way to create a custom field and populate it with an aggregate contribution amount?

Thanks for any help!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Searching Aggregate Contributions
December 05, 2007, 03:13:33 pm

This functionality is not present in CiviCRM. Your easiest bet is to build/modify a BIRT report for this.

You can potentially accomplish this by writing some code to populate a predefined custom field in the contact (and making that custom field searchable). You can then write a cron job to recompute the totals on a daily basis

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mheadd

  • Guest
Re: Searching Aggregate Contributions
December 05, 2007, 03:18:18 pm
You can potentially accomplish this by writing some code to populate a predefined custom field in the contact (and making that custom field searchable). You can then write a cron job to recompute the totals on a daily basis.

Think I'll try this one first.

Thanks!

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Searching Aggregate Contributions
December 12, 2007, 02:37:49 pm
we have use for this as well, i'd be interested in collabarating mheadd - would you drop me a line or pm so i can talk to you about it directly?
@xurizaemon ● www.fuzion.co.nz

mheadd

  • Guest
Re: Searching Aggregate Contributions
December 12, 2007, 02:53:57 pm
I've had limited time to work on this in the past few days, but I believe that I now have a workable solution figured out.  It's not the most elegant solution in the world, but I think it will get the job done.

I should be finished testing it tomorrow, and I had planned on posting the code in this forum thread.

I'll post the code here so you can take a look at it and tell me what you think.

Cheers!  :)


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Searching Aggregate Contributions
December 12, 2007, 06:04:01 pm
Folks in this week's CiviCRM Bootcamp coded up a custom search form using the upcoming 2.0 custom search framework which handles this pretty nicely. The framework is still a bit of a moving target - I think we'll be adding a few more pieces of functionality - but f you want to preview the code - it's committed to the repository in trunk at:

http://svn.civicrm.org/civicrm/trunk/CRM/Contact/Form/Search/Custom/Contribution.php

We'll be including this code in the 2.0 release and including links to these "sample" custom search forms the alpha/beta sandboxes etc. in the coming month.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Searching Aggregate Contributions

This forum was archived on 2017-11-26.