# Conditional Statements In Report Designer

**URL:** <https://forum.inductiveautomation.com/t/conditional-statements-in-report-designer/9342>\
**Category:** Ignition\
**Created:** [November 14, 2014, 1:11pm UTC](https://forum.inductiveautomation.com/t/conditional-statements-in-report-designer/9342 "2014-11-14T13:11:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [November 14, 2014, 1:11pm UTC](https://forum.inductiveautomation.com/t/conditional-statements-in-report-designer/9342/1 "2014-11-14T13:11:02Z")

</div>

Hey all,

Can someone explain to me what I’m doing wrong with the following conditional statement in the report designer? I swear it worked for 5 minutes and now I can’t get it to work at all and I’m not sure why.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/74d106fa87a9c87726296a210d16bfce31727366.png)  
  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/49f1fb515cc321c0c3acb60d273ffd7f97f3bafe.png)  

Here is the code in case it’s too hard to see in the picture:

```auto
@Priority=="0"?"Low":Priority=="1"?"Medium":Priority=="2"?"High":Priority=="3"?"Critical"@
```

And yes, the priority key is a string and not an integer.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [November 14, 2014, 6:19pm UTC](https://forum.inductiveautomation.com/t/conditional-statements-in-report-designer/9342/2 "2014-11-14T18:19:24Z")

</div>

I copied and pasted your code in my report designer and tried it out and it worked. Maybe your row is somehow not getting the expression because the expression works.

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [December 3, 2014, 3:43pm UTC](https://forum.inductiveautomation.com/t/conditional-statements-in-report-designer/9342/3 "2014-12-03T15:43:21Z")

</div>

Thanks Nick, I did figure out what was wrong I just forgot to post the follow up.

I had it set up with a table row version key to change to different style rows based on basically the same expression. I didn’t know I had to have that expression on that column for every row version.

Once I figured that out I simplified it greatly by just hard coding my values into that column on each row version. Thanks for the help!

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [December 3, 2014, 3:51pm UTC](https://forum.inductiveautomation.com/t/conditional-statements-in-report-designer/9342/4 "2014-12-03T15:51:26Z")

</div>

Cool, thanks for the follow up.
