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) »
  • Building Custom Reports
Pages: [1]

Author Topic: Building Custom Reports  (Read 1801 times)

ldjosh

  • I’m new here
  • *
  • Posts: 13
  • Karma: 1
  • Developer. Ninja. Gentleman.
Building Custom Reports
January 27, 2010, 09:44:02 am
Hey all,
Using CiviCRM 3.0.2 on Joomla 1.5.15
I'm developing custom reports. our finance department wants a report every morning of all of the users signed up for our events, what there status is (registered or pending-pay-later), and their address.

I've created the custom_php and custom_templates folders and created a custom report (called DailyEventsReport) right now it's a clone of participant listing and works just fine. I've been able to edit some of the text so I know that it's running off of the custom report.

The problem comes when trying to add things to the report criteria. the only custom report documentation i could find is at http://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+structure+and+customization and it seems it's a little... lackluster.

Street address always returned blank, though I can see in the contacts section their home and billing addresses were filled in. I'm not 100% certain where this is stored. from what I can gather it's generated from the civicrm_address table. I tried to add city in place of street_address and that worked, however when I tried to add postal_code after it displayed, but city disappeared.

is there a better set of documentation for how to add fields to report criteria? I have been looking, but been unable to find it. If someone can point me in the right direction, after i figure this out, i'd be willing to write up a good guide for the wiki.

Thanks,
LDJosh

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: Building Custom Reports
January 27, 2010, 12:08:25 pm

1. you might want to get a better handle on the CiviCRM ERD which is here:

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+ERD+2.0

2. you might want to enable to drupal devel module and check the queries being generated so you have an idea of why the street address is blank etc and why something disappears

3. thats the start of the documentation, if you can be more specific where it can be improved, we can add a bit more explanation.

ping us on IRC (link at top of screen) for more real time help

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

ldjosh

  • I’m new here
  • *
  • Posts: 13
  • Karma: 1
  • Developer. Ninja. Gentleman.
Re: Building Custom Reports
January 28, 2010, 09:31:46 am
Thanks Lobo, the ERD helps.

I've got some of the custom data coming in now. I wasn't encapsulating right the first time around, but now some of it shows up. the problem is, not everything works and I can't figure out quite why...

Can someone take a look at this explain why city and postal code and street address work but street name doesn't?
id, is_billing and is_primary didn't show up either.
according to the ERD this should be fine. I'm missing something...




Code: [Select]

'civicrm_address'     =>
                  array( 'dao'          => 'CRM_Core_DAO_Address',
                         'fields'       =>
                         array( 'city' => null,'postal_code' => null,'street_address' => null, 'street_name' => null                              
                                ),
                         'grouping'  => 'contact-fields',
                         ),  

 

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: Building Custom Reports
January 28, 2010, 10:18:42 am

street_name is not set to be "exportable" in v3.0 and below, and hence not included in reports. We did not use this field in those versions

3.1 adds support for it, and we will investigate and potentially make it "exportable"

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Building Custom Reports

This forum was archived on 2017-11-26.