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) »
  • Problems recognising parameters passed via URL into CiviReports
Pages: [1]

Author Topic: Problems recognising parameters passed via URL into CiviReports  (Read 526 times)

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Problems recognising parameters passed via URL into CiviReports
September 13, 2013, 09:56:34 am
Hey folks,

I'm aware of the general principle of passing report parameters into reports, for example in the event participant detail / list report...

Quote
http://drupal.demo.civicrm.org/civicrm/report/event/participantListing?force=1

But for some reason, I am unable to pass the role and status of participants for the events.

I can pass EVENT ID  parameters in the normal way:

Quote
http://drupal.demo.civicrm.org/civicrm/report/event/participantListing?force=1&event_id_op=in&event_id_value=1

But cannot pass the ids / values for ROLES or STATUSES in a way that I would expect, e.g.

Quote
http://drupal.demo.civicrm.org/civicrm/report/event/participantListing?force=1&role_id_op=in&role_id_value=1 and
http://drupal.demo.civicrm.org/civicrm/report/event/participantListing?force=1&status_id_op=in&status_id_value=1

I've had a fairly extensive search around the report class, but cannot see why role and status cannot be passed in via the above methods. There doesn't seem to be anything special in the report class that would do this (though obvioulsy, I am probably / must be missing something.


I also had a fairly large search around the report files for how params get past in, and, maybe I just needed a Soppka, but I couldn't work it out.  Anyone want to point me in the right direction??

Thanks,
Michael
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Problems recognising parameters passed via URL into CiviReports
September 14, 2013, 12:54:34 am
If you notice event_id / role_id / status_id doesn't have type information filled under _columns array.

Now type info for event_id is generated / populated from object of CRM_Event_DAO_Participant, but not for role_id or status_id, because object doesn't have a field matching with that name in this case.

Due to above, URL filtering process comes to know type as INT for event_id but nothing for role_id & status_id. So String is considered as default. And String doesn't have support for IN or NOTIN operator-type in v4.3

This is already fixed in v4.4 -
http://issues.civicrm.org/jira/browse/CRM-13125
https://github.com/civicrm/civicrm-core/commit/79ce64deb218ba957450260b56e84c73ddf90a7f

Other possible solutions:
1. change the filter index to name something that BAO object has, so that type field automatically gets populated.
OR
2. Fill the type info for these fields as CRM_Utils_Type::T_INT
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Problems recognising parameters passed via URL into CiviReports

This forum was archived on 2017-11-26.