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 CiviEvent (Moderator: Yashodha Chaku) »
  • Custom Search for Event Contribution aggregration
Pages: [1]

Author Topic: Custom Search for Event Contribution aggregration  (Read 3790 times)

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Custom Search for Event Contribution aggregration
April 14, 2008, 08:58:22 am
Quote from: NVCA on April 14, 2008, 03:59:05 am
2) reporting on $$$ received from each event. I have concluded that there is no link between the events & contributions so this isn't possible . This is a big limitation for us but I imagine we may have to go without for some time

The contribution amount from membership signup/renewals and for events is stored in the database - and will be available for export in an upcoming release. In the current release, you can quickly create custom search / reporting screens if you have some basic PHP and SQL skills.
Protect your investment in CiviCRM by  becoming a Member!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Custom Search for Event Contribution aggregration
April 23, 2008, 03:16:57 am
Quote
2) reporting on $$$ received from each event. I have concluded that there is no link between the events & contributions so this isn't possible . This is a big limitation for us but I imagine we may have to go without for some time

Take a look at this

http://wiki.civicrm.org/confluence/display/CRMDOC/events+aggregate+page (you have to click on the attachments tab to get the code.

It's what I am using to get some of the functionality referred to.

I've attached a screen shot. It has some limitations - some of which I identified in the post & some of which I've hit since then - but it is going a fair way towards providing what I need.

NB Dave defines 'quickly' and 'basic' differently to how I do...
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Custom Search for Event Contribution aggregration
April 23, 2008, 04:06:57 am
NB - tips on how to add the event type into my criteria would be appreciated on the above search page.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Custom Search for Event Contribution aggregration
April 23, 2008, 10:58:37 pm
Hi Eileen - We've been working on the example you posted to the wiki to get it closer to what you ideally want. I've got a checkbox for Event Type implemented, and some cleanup. We're seeing if we can also add in a Totals row - which I suspect would be good for you and would also be a good example for others. Not sure if we'll get that in - but will post back here and upload the updated files to the wiki in the next day or so.
Protect your investment in CiviCRM by  becoming a Member!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Custom Search for Event Contribution aggregration
April 24, 2008, 09:29:26 pm
I've posted an updated version of the php and tpl file which incorporates the Event Type search criteria (and a bit of cleanup).

After some experiments, discovered that the custom search framework does not support adding a Totals row (yet). We're looking at making this available for 2.1. I will post an updated version of this search that includes totals if we get that working (and we'll probably add it to the samples that are distributed with 2.1).

http://wiki.civicrm.org/confluence/display/CRMDOC/events+aggregate+page

Kudos to Eileen for pushing the custom search feature along nicely.  ;D
Protect your investment in CiviCRM by  becoming a Member!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Custom Search for Event Contribution aggregration
May 06, 2008, 02:28:05 am
Hi there,

Since posting my original code I had added in another check box to that search:

"show participants"

When this block is ticked the group by / having clause changes so that individual contributions are listed rather than the aggregate.

I re-added it to Dave's improved version of my original search as I find this useful - it's cludgey though as the 'participant name' column shows up whether or not the participants are listed.

I've attached my version of EventAggregate.php but be-warned - I took Dave's nice clean code and made it yucky again!

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Custom Search for Event Contribution aggregration
July 31, 2008, 02:34:54 am
I'm wondering if I could have some further help on this - I haven't managed to figure out by myself how to make the actual events an option that can be selected
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Search for Event Contribution aggregration
July 31, 2008, 11:48:38 am
Eileen - we're in heavy 2.1 QA mode now - but I'll try to find some time for this maybe next week. I'm assuming the version attached to your last post is your latest version ?
Protect your investment in CiviCRM by  becoming a Member!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Custom Search for Event Contribution aggregration
August 01, 2008, 06:17:24 am
Eileen, have a look at lobo's custom search,
http://civicrm.org/node/380

it let you select the event (and works awesomely, but needs some hacking for 2.0 to get the list of options, can provide my custom if needed)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Custom Search for Event Contribution aggregration
August 01, 2008, 08:51:57 pm
Thanks for that Xavier. The search I'm using gives totals for the events as well which is the main point of it - I'm please to see it has made it onto the sandbox. http://sandbox.civicrm.org/civicrm/contact/search/custom?csid=7&reset=1. The price sets search you are referring to is pretty cool too but I did manage to screw it up on the sandbox. I will play a bit more & post to the beta's thread.

Dave, my latest version is attached. I hacked yours to do something that I find invaluable which is allow me to see the list of participants OR the aggregate. I have a feeling that there is something wrong with the total I got when testing on the sandbox but without this option it's hard to work through it and decide. Other tweaks I made more recently are to make participant status in 1 or 2 ( registered or attended) and I changed the criteria to civicrm_contribution.payment_instrument_id =1 (it was not null).

Of course that means I've made your code ugly again - sigh. Also, I haven't figured out how to make the participant column disappear when not required (not a biggie).

I love that there is a link to the collection of custom searches in the new version. An automated process for downloading and installing community contributed ones would really top it off (like joomla components installs sort of thing). I'm not convinced that the location of the custom searches in the sandbox is right - under find contacts - because most of the searches are not contacts related. I would argue to rename 'find contacts' to searches and put both find contacts and customised searches and other searches from all over civicrm under that (e.g. civiContribute).

ps. really appreciate the effort going on with the new version and I'm trying to find some time (when mr 2 and mr 2 months are asleep) to have a play and help with QA

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Custom Search for Event Contribution aggregration
August 18, 2008, 07:43:33 pm
Hi,

I tackled this again & it now works as I want it to - details posted into wiki
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Custom Search for Event Contribution aggregration

This forum was archived on 2017-11-26.