# Using a python dataset to populate a table in a report

**URL:** <https://forum.inductiveautomation.com/t/using-a-python-dataset-to-populate-a-table-in-a-report/20452>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [October 30, 2018, 2:39pm UTC](https://forum.inductiveautomation.com/t/using-a-python-dataset-to-populate-a-table-in-a-report/20452 "2018-10-30T14:39:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brendan.curran](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@brendan.curran](https://forum.inductiveautomation.com/u/brendan.curran)\
**Post date:** [October 30, 2018, 2:39pm UTC](https://forum.inductiveautomation.com/t/using-a-python-dataset-to-populate-a-table-in-a-report/20452/1 "2018-10-30T14:39:31Z")

</div>

I’m not all that familiar with python at the moment. I’m trying to extract the data from a table component in a window that uses a database query to populate the table. This data will be put into a report table or a simple well ordered print statement should work equally well. However, I end up getting the first row of the table crammed into a single column repeated for as many columns that are in the table. I assume that some sort of loop needs to be done to order the data into rows/columns, but I do not know how a python dataset stores these values. I’m using the system.dataset.toPyDataSet to extract the data from the table. I’m also not very familiar with how to design the dataset parameter for the report.

---

<div class="post-metadata">

**Author:** ![brendan.curran](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@brendan.curran](https://forum.inductiveautomation.com/u/brendan.curran)\
**Post date:** [October 30, 2018, 5:17pm UTC](https://forum.inductiveautomation.com/t/using-a-python-dataset-to-populate-a-table-in-a-report/20452/2 "2018-10-30T17:17:22Z")

</div>

Problem solved via creating a memory tag to store the dataset
