* @access public
*/
function civicrm_api3_report_template_getrows($params) {
+ civicrm_api3_verify_one_mandatory($params, NULL, array('report_id', 'instance_id'));
list($rows, $instance, $labels) = _civicrm_api3_report_template_getrows($params);
return civicrm_api3_create_success($rows, $params, 'report_template', 'getrows', CRM_Core_DAO::$_nullObject, $labels);
}
function _civicrm_api3_report_template_getrows($params) {
+ if(empty($params['report_id'])) {
+ $params['report_id'] = civicrm_api3('report_instance', 'getvalue', array('id' => $params['instance_id'], 'return' => 'report_id'));
+ }
+
$class = civicrm_api3('option_value', 'getvalue', array(
'option_group_id' => 'report_template',
'return' => 'name',
*/
function _civicrm_api3_report_template_getrows_spec(&$params) {
$params['report_id'] = array(
- 'api.required' => TRUE,
'title' => 'Report ID - eg. member/lapse',
);
}