Creating a Data Filter for a Report Element

Usage

Creates a data filter for a specific report element, referenced by its ID.

Request

POST /documents/<documentID>/reports/<reportID>/elements/<elementID>/datafilter

Request body: the description of the data filter to create for the report element. The key attribute should be one of the formulaLanguageId elements of the report.

The operator is one of the available report filters:

  • Equal
  • NotEqual
  • Greater
  • GreaterOrEqual
  • Less
  • LessOrEqual
  • Between
  • NotBetween
  • InList
  • NotInList
  • IsNull
  • IsNotNull
  • IsAny
  • Like
  • NotLike
  • Both
  • Except
Response

Response type: application/xml or application/json

The response is a message stating the success or failure of the request.

Example

Request body:

<datafilter>
    <and>
        <condition key="[Lines]" operator="InList">
            <value>City Trousers</value>
            <value>Shirt Waist</value>
            <value>Jackets</value>
	   </condition>
  	 <condition key="[State]" operator="NotEqual">
	       <value>Colorado</value>
	   </condition>
        <or>
            <condition key="[Sales revenue]" operator="Greater">
                <value>5000</value>
            </condition>
            <condition key="[Sales revenue]" operator="Less">
                <value>10</value>
            </condition>
        </or>
    </and>
</datafilter>

Response:

<success>
    <message>The resource of type "Report" with identifier "1" has been successfully updated.</message>
    <id>1</id>
</success>