> For the complete documentation index, see [llms.txt](https://docs.aqua-cloud.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aqua-cloud.io/documentation/reporting/creating-custom-report-script.md).

# Creating custom report script

{% hint style="warning" %}
With our upcoming release scheduled **for Q1 2026**, we will upgrade our reporting engine from DevExpress version 21.1.4 to 24.2.7. This upgrade brings improvements, but also changes to the scripting API that may cause your existing custom scripts to stop working if not updated.

#### **📌 What you need to do**

To ensure your scripts continue to function correctly:

* Review your custom report scripts.
* Refer to the DevExpress API Reference to update property and method usage where needed.\
  \&#xNAN;*For example:*

`FieldByName` is no longer valid. Use `GetFieldByName`, which now returns a `PivotGridFieldBase` instance.

* `XRPivotGridField` is now `XRPivotGridFieldBase`.<br>
* Script references like `PivotTableStatusPriorityCounts.Fields.FieldByName` should be updated to `PivotTableStatusPriorityCounts.Fields.GetFieldByName`.<br>

🗂 **References:**

[DevExpress API – XRPivotGridFieldCollection](https://docs.devexpress.com/XtraReports/DevExpress.XtraReports.UI.PivotGrid.XRPivotGridFieldCollection)

🗂 **Devexpress changelog:**

[https://supportcenter.devexpress.com/versionhistory](https://supportcenter.devexpress.com/versionhistory?utm_source=chatgpt.com)

####

#### 🆘 Need Assistance?

If you have troubles updating your report scripts, you will have an option to **submit a support ticket**, and the aqua team will help you adjust your custom scripts.

We’re here to support you during the transition!
{% endhint %}

{% hint style="warning" %}
📅 **What’s coming next?**\
We’ll keep you informed ahead of time of any changes
{% endhint %}

Scripting plays a key role in extending the functionality of aqua reports. It allows you to extend the capabilities of the report beyond just using the data contained within aqua. Scripting gives you the ability to enrich the report by extracting data from external sources such as databases or files. You also have the flexibility to save copies of the report to specific network drives and control which items are excluded from printing during each event band iteration.

To run a script on a particular event, you need to add a script function to the element's event. You can do this by linking a script method to the <mark style="background-color:blue;">Behaviour/Scripts</mark> property. This property lists all the events that the selected element will trigger. These can be different for different element types.

<figure><img src="/files/IZ9C7l8ksRn0Cghcccoc" alt=""><figcaption><p>Script linking view</p></figcaption></figure>

To change to the scripts view, click on ![](http://aquawiki.andagon.com/pictures/drex_script_development_1_custom_2.png). Here, you can add some functionality to your report: &#x20;

<figure><img src="http://aquawiki.andagon.com/pictures/drex_script_development_1_custom_3.png" alt=""><figcaption><p>script view</p></figcaption></figure>

### **Example: Apply different colour to areas** <a href="#example__apply_different_color_to_areas" id="example__apply_different_color_to_areas"></a>

The appearance can be modified with the event “OnPrintPage” &#x20;

<figure><img src="/files/CqavQdKVDufc6CoHCUYt" alt=""><figcaption></figcaption></figure>

The appearance doesn't necessarily have to be changed by the script. They can also be changed using formatting rules.

{% hint style="info" %}
For users in a SaaS environment: Please note that the report script can only be managed from the desktop client.&#x20;

The information on how to enable scripting mode for the On-Premise customers can be found in this [article](/documentation/installation-for-on-premise/server-parameters.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.aqua-cloud.io/documentation/reporting/creating-custom-report-script.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
