# Named\_query not populating

**URL:** <https://forum.inductiveautomation.com/t/named-query-not-populating/94725>\
**Category:** Ignition\
**Tags:** vision, ignition81, scripting\
**Created:** [August 15, 2024, 10:15pm UTC](https://forum.inductiveautomation.com/t/named-query-not-populating/94725 "2024-08-15T22:15:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roger\_Denison](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@Roger\_Denison](https://forum.inductiveautomation.com/u/Roger_Denison)\
**Post date:** [August 15, 2024, 10:15pm UTC](https://forum.inductiveautomation.com/t/named-query-not-populating/94725/1 "2024-08-15T22:15:36Z")

</div>

I'm building a new report based on an existing report. The report includes a table that is populated by a named\_query. The named\_query in each report is identical except it uses a different data source. I can run the named\_queries by themselves and I get the data I want. But I can't get it to populate in the new report.

Doing a Preview on the "good" report, I get this:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/f/afb7d2c948e1e3e7db2b8ab3e32ceaff2637a90c.png)

Which goes on for several rows.

But when I preview the new report, I get:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/7/97009939910235a79089f03cc6b4f0e4b84ace47.png)

There's nothing in the xml node for named\_query.

What am I missing?

---

<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:** [August 16, 2024, 6:50am UTC](https://forum.inductiveautomation.com/t/named-query-not-populating/94725/2 "2024-08-16T06:50:50Z")

</div>

Make sure the parameters are what you think they are.  
Maybe try a simpler query to check them.

Also, how do you change the data source ?

---

<div class="post-metadata">

**Author:** ![Roger\_Denison](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@Roger\_Denison](https://forum.inductiveautomation.com/u/Roger_Denison)\
**Post date:** [August 16, 2024, 8:57pm UTC](https://forum.inductiveautomation.com/t/named-query-not-populating/94725/3 "2024-08-16T20:57:26Z")

</div>

The named query allows us to select the data source. I am reading from two databases but the table schema are identical.

Like I mentioned, I am able to run the queries from the named query test and they work just fine. I reviewed the two parameters and they are both correct syntax and spelling.
