# Reporting module grouping

**URL:** <https://forum.inductiveautomation.com/t/reporting-module-grouping/3301>\
**Category:** Ignition\
**Created:** [September 19, 2011, 3:33pm UTC](https://forum.inductiveautomation.com/t/reporting-module-grouping/3301 "2011-09-19T15:33:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott\_stc](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@scott\_stc](https://forum.inductiveautomation.com/u/scott_stc)\
**Post date:** [September 19, 2011, 3:33pm UTC](https://forum.inductiveautomation.com/t/reporting-module-grouping/3301/1 "2011-09-19T15:33:55Z")

</div>

We are trying to set a report that has grouping based not on a particluar category (mach 1, mach2, clipper, etc…), but by date. I.e. - have the report show a new group for each day, so that the end user can see how much product was weighed on a daily basis during each weighout, then a total for each day. We have the query sorted/grouped by t\_stamp, but beyond that, how can we group the data by day? Any help is appreciated. Thanks

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [September 19, 2011, 7:00pm UTC](https://forum.inductiveautomation.com/t/reporting-module-grouping/3301/2 "2011-09-19T19:00:20Z")

</div>

You just need to bring back that grouping as extra columns in the dataset. For example, if you want to group on month you can bring back:

SELET MONTH(t\_stamp) as Month …

in your query and use the table grouping options in the report to group on Month. Hope that helps getting you started.

---

<div class="post-metadata">

**Author:** ![scott\_stc](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@scott\_stc](https://forum.inductiveautomation.com/u/scott_stc)\
**Post date:** [September 19, 2011, 10:15pm UTC](https://forum.inductiveautomation.com/t/reporting-module-grouping/3301/3 "2011-09-19T22:15:39Z")

</div>

Travis,

That was the key we were looking for. Sometimes we’re are too close to the obvious. 😆 Thank for the help.

---

<div class="post-metadata">

**Author:** ![scott\_stc](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@scott\_stc](https://forum.inductiveautomation.com/u/scott_stc)\
**Post date:** [October 4, 2011, 4:20pm UTC](https://forum.inductiveautomation.com/t/reporting-module-grouping/3301/4 "2011-10-04T16:20:51Z")

</div>

Travis,  
We put in the extra column in our query: Day(t\_stamp), and it comes up just fine in the data table for the query. But when we try to reference that column in the report, it either comes up as 0, or as . It’s as though that extra column is not visible to the reporting module. Is this a possibility?  
Thanks.

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [October 4, 2011, 4:45pm UTC](https://forum.inductiveautomation.com/t/reporting-module-grouping/3301/5 "2011-10-04T16:45:59Z")

</div>

Try adding “AS some\_other\_variable\_name” after that function in your SQL query. Then verify that your new column and data exists in the dataSet. You should then be able to access it in the Report.

---

<div class="post-metadata">

**Author:** ![scott\_stc](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@scott\_stc](https://forum.inductiveautomation.com/u/scott_stc)\
**Post date:** [October 4, 2011, 8:14pm UTC](https://forum.inductiveautomation.com/t/reporting-module-grouping/3301/6 "2011-10-04T20:14:06Z")

</div>

Nathan, we added: Day(t\_stamp) AS Date. Then used Date at the grouping column. That worked out perfectly. Thanks!
