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 (Moderator: Dave Greenberg) »
  • Performing calculations on entered data
Pages: [1]

Author Topic: Performing calculations on entered data  (Read 989 times)

wpost

  • Guest
Performing calculations on entered data
March 26, 2012, 08:00:01 pm
An organization wishes to perform simple calculations on entered data. They assist individuals in setting up microbusinesses, and their institutional donors require them to track:

* Whether each business is a sole proprietorship or partnership
* A breakdown by sex of the partners of each business

Currently this information is derived manually, but CiviCRM will have enough information to derive this. For example, if CiviCRM knows that Alice and Bob and Carol are the partners in ABC Co., then "ABC Co.: 3 partners (2 female, 1 male)" can be derived automatically rather than manually as now.

Can CiviCRM do this? How?

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: Performing calculations on entered data
March 26, 2012, 08:28:50 pm

you'll need to this via a custom report, i.e. u'll need to write custom code (probably via the reporting framework might be the easiest)

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

wpost

  • Guest
Re: Performing calculations on entered data
March 27, 2012, 10:17:07 am
Thank you; that is helpful. I am reading up on CiviCRM's reporting framework and on CiviReport generally now. I have no prior experience with CiviReport, so bear with me as I ask two newbie follow-up questions:

1. Is there a custom report HOWTO or tutorial? I'm not afraid to RTFM and I'm not looking to be spoon fed, but I haven't yet found a hands-on resource.

2. If I understand what I've read so far, a report can generate and display the information desired -- but it won't display that information in each microbusiness's summary tab, which is where the users would find it most useful. Is there a way to place calculated data in a contact's summary tab? Or should I be taking this one step at a time?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Performing calculations on entered data
March 27, 2012, 01:06:12 pm
Where you go from here depends on your level of comfort with Code. There are 2 options.

One is to customize a report - there are some tutorials out there & info on the WIKi - eg. http://artfulrobot.com/civicrm-custom-birthdays-report
http://wiki.civicrm.org/confluence/display/CRMDOC41/CiviReport+structure+and+customization

The other option is to customise the tpl file using a combination of smarty & CRMApi
({crmAPI entity="relationship" action="get" var="relationships" contact_id_a=$contactId relationship_type_id=1})
http://forum.civicrm.org/index.php/topic,9859.msg79806.html#msg79806

Both of these are fairly easy entry points into customising CiviCRM. But they are both a big step if you haven't customised CiviCRM before - you will want to go on IRC & ask questions there as you hit them.

For either approach you'll need to set up custom php & tpl directories

http://wiki.civicrm.org/confluence/display/CRMDOC41/Customize+Built-in,+Profile,+Contribution+and+Event+Registration+Screens

(NB these aren't the only possible ways to customise here)
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

wpost

  • Guest
Re: Performing calculations on entered data
March 29, 2012, 01:29:24 pm
Many thanks; that gives me a lot to get my head around.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Performing calculations on entered data
March 29, 2012, 05:41:02 pm
There is also hook_civicrm_tabs whereby you can add a tab to a Contact's display. Sounds like that is what you want.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Performing calculations on entered data

This forum was archived on 2017-11-26.