# Ignition Report using named query

**URL:** <https://forum.inductiveautomation.com/t/ignition-report-using-named-query/73674>\
**Category:** Ignition\
**Tags:** perspective, ignition81, database\
**Created:** [May 12, 2023, 11:59pm UTC](https://forum.inductiveautomation.com/t/ignition-report-using-named-query/73674 "2023-05-12T23:59:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Penn](https://avatars.discourse-cdn.com/v4/letter/p/ba9def/32.png) [@Penn](https://forum.inductiveautomation.com/u/Penn)\
**Post date:** [May 12, 2023, 11:59pm UTC](https://forum.inductiveautomation.com/t/ignition-report-using-named-query/73674/1 "2023-05-12T23:59:49Z")

</div>

I have a nested query that I can execute in the designer and I am getting the desired results in the testing tab of the named query. But when I use this same named query in a report, one of the values is receiving null somehow and this is also causing the other values from the query to show 0 instead of the results shown in the testing tab. Does anyone know what is going wrong?

---

<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:** [May 13, 2023, 7:38am UTC](https://forum.inductiveautomation.com/t/ignition-report-using-named-query/73674/2 "2023-05-13T07:38:49Z")

</div>

One of the parameters might be getting a different value ?  
Can you give us more details ?

---

<div class="post-metadata">

**Author:** ![Penn](https://avatars.discourse-cdn.com/v4/letter/p/ba9def/32.png) [@Penn](https://forum.inductiveautomation.com/u/Penn)\
**Post date:** [May 13, 2023, 11:26am UTC](https://forum.inductiveautomation.com/t/ignition-report-using-named-query/73674/3 "2023-05-13T11:26:20Z")

</div>

The named query that we use in the report selects one row filled with A, B, and C for example, the named query data source is named Stats. A is a float, B is a float, C is an int. The report displays each of these values in a simple table,  
A: Stats.A  
B: Stats.B  
C: Stats.C  
When this query is executed in the database and the designer's named query testing tab, we get results like,  
A B C  
0.213 17.0 23  
But in the designer's preview tab and a perspective session where I am choosing my parameters, I am seeing this,  
A: \<N/A\>  
B: 0  
C: 0

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 13, 2023, 1:36pm UTC](https://forum.inductiveautomation.com/t/ignition-report-using-named-query/73674/4 "2023-05-13T13:36:55Z")

</div>

Sounds like a typo in your report parameters somewhere.

---

<div class="post-metadata">

**Author:** ![Penn](https://avatars.discourse-cdn.com/v4/letter/p/ba9def/32.png) [@Penn](https://forum.inductiveautomation.com/u/Penn)\
**Post date:** [May 13, 2023, 2:43pm UTC](https://forum.inductiveautomation.com/t/ignition-report-using-named-query/73674/6 "2023-05-13T14:43:04Z")

</div>

Thank you, I was not setting the value to the parameters correctly.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/c/7cb98e99abc1184578ca9c559a8925a69c79dd2b.png)
