# Report design issues with tableGroup and nestedQueries

**URL:** <https://forum.inductiveautomation.com/t/report-design-issues-with-tablegroup-and-nestedqueries/58354>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [April 12, 2022, 2:04pm UTC](https://forum.inductiveautomation.com/t/report-design-issues-with-tablegroup-and-nestedqueries/58354 "2022-04-12T14:04:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alberic\_cusin](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@Alberic\_cusin](https://forum.inductiveautomation.com/u/Alberic_cusin)\
**Post date:** [April 12, 2022, 2:04pm UTC](https://forum.inductiveautomation.com/t/report-design-issues-with-tablegroup-and-nestedqueries/58354/1 "2022-04-12T14:04:07Z")

</div>

Hi,

I am trying to build a report with a tableGroup and nestedQueries.  
In fact, I have to select IDs from my table “Affaires”, then for those IDs, I need to select all actions, from the “Actions” table. Finally, I need to retrieve parameters and values from the “Parameters” table.  
**What I am trying to have in the final report is one table per action and within all the parameters about this action.**  
I let you see my screenshots below, but my parameters are not listed, only the first one “repere” whereas for some, there are at least 7 of them !  
I’ve tested my SQL queries, and they work fine.  
I tried two different methods : one with three layers in the table group, but there are only “\<N/A\>” times the number of lines. Moreover, when I try to add a Grouping key in the third tab, I always get “The key choose is not a sub-key of this tables…”. It means that my third layer isn’t valid, is it ? Maybe one of the reason, but I can’t get it right. Does nested queries are limited to 2 layers or am I just delusional ?

![tableGroupScreenShot](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/da8af02322b60a957344c2f87393e892d0428a5c.png)  
 ![m2NewPageAction](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/0/c0d6b47c0c946c9d06200c91cdc2aaa0f1d79aa3.png)

 ![m2SinglePageAction](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/b/bb4c494b159aa308ac8310820b14981ab4cdbef3.png)  
, and one with only two and putting the parameters values into “Actions Details”, only the first parameter is printed :  
 ![methode1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/f/ff8c756a6b8718595981e0cc002d28641b514c6d.png)  
 ![newPageAction](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/2/0291fac5526d96930af5f85aba06bcf4e51e8c59.png)  
 ![singlePageActions](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/6/d6246632a990f978c9043bd22970146491137d9c.png)  
I hope that it is clear enough and my screenshots will be helpful.  
Any help will be appreciated !

**EDIT :**  
I’ve finally managed to get everything but I had to stay with a 2 layers nested query. It means that I have bigger queries with lot of joins but still easier to work with than a single one !

---

<div class="post-metadata">

**Author:** ![Alberic\_cusin](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@Alberic\_cusin](https://forum.inductiveautomation.com/u/Alberic_cusin)\
**Post date:** [April 15, 2022, 8:59am UTC](https://forum.inductiveautomation.com/t/report-design-issues-with-tablegroup-and-nestedqueries/58354/2 "2022-04-15T08:59:31Z")

</div>

Done.
