# Use rows from SQL query to create variable amount of text boxes in report

**URL:** <https://forum.inductiveautomation.com/t/use-rows-from-sql-query-to-create-variable-amount-of-text-boxes-in-report/15072>\
**Category:** Ignition\
**Tags:** database, scripting\
**Created:** [August 15, 2017, 6:02pm UTC](https://forum.inductiveautomation.com/t/use-rows-from-sql-query-to-create-variable-amount-of-text-boxes-in-report/15072 "2017-08-15T18:02:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rhys\_m](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rhys\_m](https://forum.inductiveautomation.com/u/Rhys_m)\
**Post date:** [August 15, 2017, 6:02pm UTC](https://forum.inductiveautomation.com/t/use-rows-from-sql-query-to-create-variable-amount-of-text-boxes-in-report/15072/1 "2017-08-15T18:02:48Z")

</div>

Hi,

I am doing a small project which is mainly handling forms. The forms are recording data from inspections and then inputting any actions required into a database. I want to then run a report which will list in text format the actions required for a certain area. I have got the data out as an sql data source, however I would then like to create multiple text boxes (amount of boxes dependent on the amount of actions required) that lists the actions that have been logged to the database. I am not entirely sure if this can be done. I am thinking of using a for loop to cycle through the dataset, however I am not sure how to dynamically put these into the required amount of datasources?

Hopefully that makes sense,

Thanks in advance

Rhys

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 15, 2017, 6:39pm UTC](https://forum.inductiveautomation.com/t/use-rows-from-sql-query-to-create-variable-amount-of-text-boxes-in-report/15072/2 "2017-08-15T18:39:50Z")

</div>

A table object in a report will create a ‘Details’ row for every row from the parent dataset, even if you haven’t configured anything inside the table cells. This would be your best base to extend out a dynamic report object - there’s no other ability to create multiple objects dynamically in a report.

---

<div class="post-metadata">

**Author:** ![Rhys\_m](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rhys\_m](https://forum.inductiveautomation.com/u/Rhys_m)\
**Post date:** [August 15, 2017, 6:41pm UTC](https://forum.inductiveautomation.com/t/use-rows-from-sql-query-to-create-variable-amount-of-text-boxes-in-report/15072/3 "2017-08-15T18:41:19Z")

</div>

Cool, thanks will take a look into it, did think it may be a long shot.

Thanks

Rhys

---

<div class="post-metadata">

**Author:** ![MP-SysEng](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mp-syseng/32/3828_2.png) [@MP-SysEng](https://forum.inductiveautomation.com/u/MP-SysEng)\
**Post date:** [August 24, 2017, 2:43pm UTC](https://forum.inductiveautomation.com/t/use-rows-from-sql-query-to-create-variable-amount-of-text-boxes-in-report/15072/4 "2017-08-24T14:43:42Z")

</div>

If you want a printed report I’d do as @paul-griffith mentioned (since he’d know much better than I about that). If a screen based report you could setup something with a template repeater or a template canvas / repeater combination that could be programmed with such functionality (# of text areas based on # of rows in a dataset for instance).

Forms is one area that would be good for Ignition to have a good module for common uses - I think their may be a 3rd party module for some forms related things but not sure off my head. Give the Marketplace a look.
