src/Jaspersoft/Service/OptionsService.php
public function updateReportOptions($uri, $controlOptions, $label, $overwrite)
    {
		$url = $this->service_url . '/reports' . $uri . '/options';
        $url .= '?' . Util::query_suffix(array('label' => utf8_encode($label), 'overwrite' => $overwrite));
		$body = json_encode($controlOptions);
		$data = $this->service->prepAndSend($url, array(200), 'POST', $body, true, 'application/json', 'application/json');
        $data_array = json_decode($data, true);
        return new ReportOptions($data_array['uri'], $data_array['id'], $data_array['label']);
	}
public function updateReportOptions($uri, $controlOptions, $label, $overwrite)
    {
		$url = $this->service_url . '/reports' . $uri . '/options';
        $url .= '?' . Util::query_suffix(array('label' => utf8_encode($label), 'overwrite' => $overwrite));
		$body = json_encode($controlOptions);
		$data = $this->service->prepAndSend($url, array(200), 'POST', $body, true, 'application/json', 'application/json');
        $data_array = json_decode($data, true);
        return new ReportOptions($data_array['uri'], $data_array['id'], $data_array['label']);
	}
public function updateReportOptions ( $ uri , $ controlOptions , $ label , $ overwrite ) { $ url = $ this -> service_url . '/reports' . $ uri . '/options' ; $ url .= '?' . Util :: query_suffix ( array ( 'label' => utf8_encode ( $ label ) , 'overwrite' => $ overwrite ) ) ; $ body = json_encode ( $ controlOptions ) ; $ data = $ this -> service -> prepAndSend ( $ url , array ( 200 ) , 'POST' , $ body , true , 'application/json' , 'application/json' ) ; $ data_array = json_decode ( $ data , true ) ; return new ReportOptions ( $ data_array [ 'uri' ] , $ data_array [ 'id' ] , $ data_array [ 'label' ] ) ; }
Update or Create new Report Options.

The argument $controlOptions must be an array in the following form:

array('key' => array('value1', 'value2'), 'key2' => array('value1-2', 'value2-2'))

Note that even when there is only one value, it must be encapsulated within an array.

@param string $uri
@param array $controlOptions
@param string $label
@param boolean $overwrite
@throws \Jaspersoft\Exception\RESTRequestException
@return \Jaspersoft\Dto\Options\ReportOptions
Update or Create new Report Options .