# Report not showing boolean values

**URL:** <https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002>\
**Category:** Ignition\
**Created:** [August 14, 2012, 6:13pm UTC](https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002 "2012-08-14T18:13:47Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimE](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@TimE](https://forum.inductiveautomation.com/u/TimE)\
**Post date:** [August 14, 2012, 6:13pm UTC](https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002/1 "2012-08-14T18:13:47Z")

</div>

Gateway PC: Windows Server 08  
Ignition 7.5.1 (b1122)  
Java 1.6.0\_31  
SQL Server 2008 R2

Client PC: Windows 7  
Java 1.7.0\_05

I have a dataset in a report that contains some boolean columns. When this data is placed on a report and printed it only shows . If I use a case statement in the query like:

`(CASE
		WHEN (L1Log_Winder.AutoCutOnSS=0) THEN 'Off'
		WHEN (L1Log_Winder.AutoCutOnSS=1) THEN 'On' END) as AutoCutOnSS`  
then the text shows up fine.

I do not know how long this has been a problem. I looked in the dataset and the values do contain a “True” or “False” value.

Can you confirm whether you see this on your end?  
Thanks,

---

<div class="post-metadata">

**Author:** ![Michael.Stofan](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.stofan/32/3342_2.png) [@Michael.Stofan](https://forum.inductiveautomation.com/u/Michael.Stofan)\
**Post date:** [August 14, 2012, 9:12pm UTC](https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002/2 "2012-08-14T21:12:27Z")

</div>

Are the boolean values in your dataset actually of the data type Boolean and not String or Integer?

---

<div class="post-metadata">

**Author:** ![TimE](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@TimE](https://forum.inductiveautomation.com/u/TimE)\
**Post date:** [August 14, 2012, 9:32pm UTC](https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002/3 "2012-08-14T21:32:16Z")

</div>

It is a ‘Bit’ data type which is the type used for Boolean in SQL Server.

---

<div class="post-metadata">

**Author:** ![dave.fogle](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@dave.fogle](https://forum.inductiveautomation.com/u/dave.fogle)\
**Post date:** [August 14, 2012, 10:22pm UTC](https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002/4 "2012-08-14T22:22:27Z")

</div>

I am unable to recreate this issue here. I set up a table in SQL Server with a column of type bit. Added 5 rows of data, alternating true and false. I then bound the dataset of a report viewer component to:`SELECT * from my_table`Finally I added a table to my report based on my dataset and dragged the "boolean\_col" key into the first column. When I view the report true and false are displayed as the values.

---

<div class="post-metadata">

**Author:** ![TimE](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@TimE](https://forum.inductiveautomation.com/u/TimE)\
**Post date:** [August 16, 2012, 3:14pm UTC](https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002/5 "2012-08-16T15:14:16Z")

</div>

I created the example as you describe and I get the same results you had. I am not using the table in my report though.

Do this…

Open the designer  
Click the ‘Key’ tab  
Drag and drop a single field onto the report.

When the report is viewed, the ‘bit’ values show up as while other data types are OK.

I attached a window showing an example of what I am getting.  
[bit\_test.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/03a2f0d9807891b3587cbba1d3e8f1989416af99.proj) (11.3 KB)

---

<div class="post-metadata">

**Author:** ![dave.fogle](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@dave.fogle](https://forum.inductiveautomation.com/u/dave.fogle)\
**Post date:** [August 16, 2012, 5:20pm UTC](https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002/6 "2012-08-16T17:20:32Z")

</div>

Ok, so what seems to be going on is that the key is part of a dataset and when you drag that key on as a label it displays because it thinks that there are multiple rows of data even if there is only one row. What you should do is add a boolean dynamic property to the report viewer and use your select query to bring back the one value that you want. Then you can drag this new property into your report and it should show up fine.

---

<div class="post-metadata">

**Author:** ![TimE](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@TimE](https://forum.inductiveautomation.com/u/TimE)\
**Post date:** [August 16, 2012, 6:33pm UTC](https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002/7 "2012-08-16T18:33:29Z")

</div>

Yes, a dynamic property will work. Using a case statement will work as outlined in the original post. Another option would be to include a row index after the key is dropped to the form `@data[0].field@`

Every data type works properly except the boolean. Ideally this should be fixed rather than having to go back and fix several reports that used to work.

---

<div class="post-metadata">

**Author:** ![Michael.Stofan](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.stofan/32/3342_2.png) [@Michael.Stofan](https://forum.inductiveautomation.com/u/Michael.Stofan)\
**Post date:** [August 16, 2012, 8:13pm UTC](https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002/8 "2012-08-16T20:13:05Z")

</div>

So this report used to work without the CASE statement? If so, do you recall which version of Ignition it worked with?

---

<div class="post-metadata">

**Author:** ![TimE](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@TimE](https://forum.inductiveautomation.com/u/TimE)\
**Post date:** [August 16, 2012, 8:32pm UTC](https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002/9 "2012-08-16T20:32:39Z")

</div>

Yes, but age prevents me from answering the version question. ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

We started with FactoryPMI version 3.? and upgraded along the way until the latest version of Ignition. A few years ago I had some complaints about what the ones and zeros meant so I replaced some of them with the case statement to give more meaningful text. I would guess it would be in the last two years it stopped working.

---

<div class="post-metadata">

**Author:** ![dave.fogle](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@dave.fogle](https://forum.inductiveautomation.com/u/dave.fogle)\
**Post date:** [August 16, 2012, 8:37pm UTC](https://forum.inductiveautomation.com/t/report-not-showing-boolean-values/5002/10 "2012-08-16T20:37:00Z")

</div>

Interesting.

Well I'll add a ticket to look into this issue but I honestly can't think of anything that would have changed that would have made this go from working to not working. I don't see how it ever could have worked. Not sure where this will end up on the priority list but it will be in our system as something to be investigated.
