Pass custom Data Key to Chart Component in Report Module

I want to create a report that displays a dynamic number of sensor data trends. For each sensor on the report page, I need to generate a separate trend chart. Since the number of sensors is dynamic and retrieved from the database, I decided to use a Table Component with an unstructured row, allowing each row to automatically generate a Chart Component for each sensor.

My challenge is how to pass a custom Data Key to each Chart Component. I tried using the Edit Script option under the Property Inspector, but it appears that I cannot change the dataset of the JFreeChart object through the chart script. Additionally, a dataset cannot contain another dataset as a column, so I cannot embed datasets inside a parent dataset.

Given these limitations, I’m unsure how to correctly implement this report design. What is the recommended approach to achieve dynamic per-row charts in this scenario?

Use nested queries for the chart data. Then the data key for the chart is the nested query key. (Automatically delivering the nested chart data for the outer row.)

1 Like