Updating a Report Element

You can update the following types of report element:

  • Section
  • Cell
  • PageZone

You must provide the relevant parameters for the element you want to update.

Request

PUT <webiURL>/documents/{documentId}/reports/{reportId}/elements/{elementId}

Where:
  • {documentId} is the document identifier retrieved from the list of documents
  • {reportId} is the report identifier retrieved from the list of reports
  • {elementId} is the element identifier retrieved from the list of elements of a report

Request body: the element to update.

Response

Response type: application/xml or application/json

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

Example

To update a section

POST <webiURL>/documents/127/reports/1/elements/43

Request body:

<element type="Section">
    <parentId>2</parentId>
    <content>
        <axes duplicateRowAggregation="true">
            <axis role="Row">
                <expressions>
                    <formula dataType="String">=[Year]</formula>
                </expressions>
            </axis>
        </axes>
    </content>
</element>

Response:

<success>
    <message>The resource of type 'Report element' with identifier '43' has been successfully updated.</message>
    <id>43</id>
</success>

Example

To update a cell

Request body:

<element type="Cell">
    <parentId>2</parentId>
    <size minimalWidth="4500" minimalHeight="675" autofitWidth="false" autofitHeight="true"/>
    <padding left="75" right="75" top="75" bottom="75"/>
    <content>
        <expression>
            <formula type="Text" dataType="Numeric">=Sum([Sales revenue])</formula>
        </expression>
    </content>
</element>
To update a PageZone

Request body:

<element type="PageZone">
    <size minimalHeight="5358"/>
</element>