# Report dynamic color change

**URL:** <https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673>\
**Category:** Ignition\
**Tags:** scripting, reporting\
**Created:** [February 14, 2024, 9:13am UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673 "2024-02-14T09:13:57Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vatsal\_Shah](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vatsal\_Shah](https://forum.inductiveautomation.com/u/Vatsal_Shah)\
**Post date:** [February 14, 2024, 9:13am UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673/1 "2024-02-14T09:13:57Z")

</div>

In Report module I have two table.  
For eg. Table 1 is having data of age and table 2 is having data of name. both table are in same report only.  
Both are seperate table so the datakey are different for them.  
I want to check the age and the change the font color of data of the second table with names.  
For eg. if age is in the first row of table 1 is greater than 18 then the first row of the table 2 will be in green or else it will be some other color.

Is there a way to achieve this ?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 14, 2024, 9:33am UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673/2 "2024-02-14T09:33:09Z")

</div>

Why not use one table with 2 columns?

---

<div class="post-metadata">

**Author:** ![Vatsal\_Shah](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vatsal\_Shah](https://forum.inductiveautomation.com/u/Vatsal_Shah)\
**Post date:** [February 14, 2024, 9:50am UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673/3 "2024-02-14T09:50:58Z")

</div>

because i'm not getting dataset from somewher. I have to make dataset through script

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 14, 2024, 9:58am UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673/4 "2024-02-14T09:58:29Z")

</div>

I dont see why that stops you, could you show the two tables and script?

---

<div class="post-metadata">

**Author:** ![Vatsal\_Shah](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vatsal\_Shah](https://forum.inductiveautomation.com/u/Vatsal_Shah)\
**Post date:** [February 14, 2024, 10:32am UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673/5 "2024-02-14T10:32:17Z")

</div>

see with script i'm generating 6 datasets.  
i dont know how to combine all this data sets

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 14, 2024, 10:35am UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673/6 "2024-02-14T10:35:00Z")

</div>

we cant give more specific help without seeing the code  
[https://docs.inductiveautomation.com/display/DOC81/system.dataset.addColumn](https://docs.inductiveautomation.com/display/DOC81/system.dataset.addColumn)

---

<div class="post-metadata">

**Author:** ![Vatsal\_Shah](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vatsal\_Shah](https://forum.inductiveautomation.com/u/Vatsal_Shah)\
**Post date:** [February 14, 2024, 11:03am UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673/7 "2024-02-14T11:03:22Z")

</div>

Tried but not wotking this way in code throws error

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [February 14, 2024, 11:12am UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673/8 "2024-02-14T11:12:05Z")

</div>

If your code throws an error it doesn't mean it's not the right solution, it only means you did it wrong.

Give us more details. We can't do much with what you told us so far.

---

<div class="post-metadata">

**Author:** ![Vatsal\_Shah](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vatsal\_Shah](https://forum.inductiveautomation.com/u/Vatsal_Shah)\
**Post date:** [February 14, 2024, 11:34am UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673/9 "2024-02-14T11:34:48Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/8/7803d1b05eb96e3d45c46019b855bd298090974e.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/8/78c0d2da68a6519eb4d269724a03b34c470e568a.png)  
There should be PIWIP and P1StatusDataset instead.  
PIWIP and P1StatusDataset are pydatasets fyi

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 14, 2024, 12:03pm UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673/10 "2024-02-14T12:03:48Z")

</div>

what is the error

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 14, 2024, 12:06pm UTC](https://forum.inductiveautomation.com/t/report-dynamic-color-change/85673/11 "2024-02-14T12:06:25Z")

</div>

Vatsal, please read back through your posts and ask yourself how anyone could help with the information you have provided. If you really want help you're going to give a lot more detail. Post code - not pictures of code. Post formatted SQL queries. Explain the data structure. Show sample source data. Show a mockup of what you want it to look like. Be serious!
