# Transaction Group Reporting Parameters

**URL:** <https://forum.inductiveautomation.com/t/transaction-group-reporting-parameters/46457>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [May 6, 2021, 9:14pm UTC](https://forum.inductiveautomation.com/t/transaction-group-reporting-parameters/46457 "2021-05-06T21:14:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hrenteria](https://avatars.discourse-cdn.com/v4/letter/h/6bbea6/32.png) [@hrenteria](https://forum.inductiveautomation.com/u/hrenteria)\
**Post date:** [May 6, 2021, 9:14pm UTC](https://forum.inductiveautomation.com/t/transaction-group-reporting-parameters/46457/1 "2021-05-06T21:14:18Z")

</div>

Hello,

We are using transaction group to create a report for temperature points set at 8-hour intervals. At first, we only wanted to report on all the temperature points not individual’s ones. However, now we are looking to do a mixture of individual temperature points or multiples one. We are stuck on what will be the best course action in trying to create these parameters that allows us to choose which temperature points to put into the report. (Similar in the way the tag historian use the easy graphs and you can select the pens for the graphs). I understand that scripting is required, but not sure how to start it. We can create the report with the transaction group, but it is with all the points.

Thank you,

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 6, 2021, 11:50pm UTC](https://forum.inductiveautomation.com/t/transaction-group-reporting-parameters/46457/2 "2021-05-06T23:50:28Z")

</div>

You don’t need to change the transaction group–that’s doing just the **recording** to a table. In the report, if you don’t want all of the columns, just trim down the “select” column list in your query to just the ones you want (plus the t\_stamp column, first). Like so:

```auto
SELECT t_stamp, someColumn, someOtherColumn
FROM myTransactionTable
WHERE t_stamp >= ? AND t_stamp < ?

```

---

<div class="post-metadata">

**Author:** ![hrenteria](https://avatars.discourse-cdn.com/v4/letter/h/6bbea6/32.png) [@hrenteria](https://forum.inductiveautomation.com/u/hrenteria)\
**Post date:** [May 7, 2021, 5:14pm UTC](https://forum.inductiveautomation.com/t/transaction-group-reporting-parameters/46457/3 "2021-05-07T17:14:13Z")

</div>

Thank you for your response,

Is there a way we can incorporate this into the report design? I would like the option to be able to click on a button that trims downs on the “select” columns on the screen we are using that displays the report. I understand that with current release, Ignition has not really incorporated a feature like this for transaction groups.  
Thank you.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 7, 2021, 9:44pm UTC](https://forum.inductiveautomation.com/t/transaction-group-reporting-parameters/46457/4 "2021-05-07T21:44:52Z")

</div>

In the report designer, you have total control over your queries. But then at runtime, reports generally have to have a fixed set of columns in a table or pens in a chart. Are you struggling with creating your queries in the designer? Or are you struggling with getting dynamic behavior for the end-user?

---

<div class="post-metadata">

**Author:** ![hrenteria](https://avatars.discourse-cdn.com/v4/letter/h/6bbea6/32.png) [@hrenteria](https://forum.inductiveautomation.com/u/hrenteria)\
**Post date:** [May 7, 2021, 10:05pm UTC](https://forum.inductiveautomation.com/t/transaction-group-reporting-parameters/46457/5 "2021-05-07T22:05:32Z")

</div>

I am struggling with getting dynamic behavior for the end user.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 7, 2021, 11:46pm UTC](https://forum.inductiveautomation.com/t/transaction-group-reporting-parameters/46457/6 "2021-05-07T23:46:41Z")

</div>

FWIW, I haven't had to do this....

Anyways, Ignition's report generator is not dynamic. It isn't related to transaction groups, either. To get something like what you describe, you will have to create a report that uses a fixed set of column names for raw data, where that raw data is queried by script instead of binding, so you can post-process the column names into the names the report is stuck using. You'll have to use dynamic column widths so you can set unused columns to zero width (assuming a bit here...). You'll want to use dynamic column headings, too, to fake the displayed column names.

This discussion is relevant:

> [@Dynamic Table in Reporting](http://forum.inductiveautomation.com/t/dynamic-table-in-reporting/21397/9):
>
> If the formatting difference you’re looking for is the number of rows/columns in the table, and the names on the columns, this can be done, but it is a big of a slog. Here’s how I did it: In my report, I have a table with the most columns I expect I could ever need (7 in my case). That table looks for column names like ‘A’, ‘B’, ‘C’, ‘D’ in the dataset it is pulling from. Some layout features of the cells like hidden and width are bound to custom report data named like ‘COL\_x\_HIDDEN’ and ‘CO…

Maybe @justin.brzozoski will enlighten us further... (:

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [May 8, 2021, 3:26pm UTC](https://forum.inductiveautomation.com/t/transaction-group-reporting-parameters/46457/7 "2021-05-08T15:26:08Z")

</div>

One of my report script data sources can take normal dataset with any number of columns up to 7, with any column names, and then uses that to populate the report `data` map with values and dataset that look like this (copied from the preview XML):

```auto
<?xml version="1.0" ?>
<sample-data>
	<!--This is the raw data used to create the report preview.-->
	<DTABLE_COL_A_NAME>SN</DTABLE_COL_A_NAME>
	<DTABLE_COL_A_VISIBLE>true</DTABLE_COL_A_VISIBLE>
	<DTABLE_COL_A_WIDTH>71</DTABLE_COL_A_WIDTH>
	<DTABLE_COL_B_NAME>Name</DTABLE_COL_B_NAME>
	<DTABLE_COL_B_VISIBLE>true</DTABLE_COL_B_VISIBLE>
	<DTABLE_COL_B_WIDTH>201</DTABLE_COL_B_WIDTH>
	<DTABLE_COL_C_NAME>Online</DTABLE_COL_C_NAME>
	<DTABLE_COL_C_VISIBLE>true</DTABLE_COL_C_VISIBLE>
	<DTABLE_COL_C_WIDTH>67</DTABLE_COL_C_WIDTH>
	<DTABLE_COL_D_NAME>AIN1</DTABLE_COL_D_NAME>
	<DTABLE_COL_D_VISIBLE>true</DTABLE_COL_D_VISIBLE>
	<DTABLE_COL_D_WIDTH>67</DTABLE_COL_D_WIDTH>
	<DTABLE_COL_E_NAME>DIN1</DTABLE_COL_E_NAME>
	<DTABLE_COL_E_VISIBLE>true</DTABLE_COL_E_VISIBLE>
	<DTABLE_COL_E_WIDTH>67</DTABLE_COL_E_WIDTH>
	<DTABLE_COL_F_NAME>DIN2</DTABLE_COL_F_NAME>
	<DTABLE_COL_F_VISIBLE>true</DTABLE_COL_F_VISIBLE>
	<DTABLE_COL_F_WIDTH>67</DTABLE_COL_F_WIDTH>
	<DTABLE_COL_G_NAME></DTABLE_COL_G_NAME>
	<DTABLE_COL_G_VISIBLE>false</DTABLE_COL_G_VISIBLE>
	<DTABLE_COL_G_WIDTH>0</DTABLE_COL_LG_WIDTH>
	<DTABLE_DATA>
		<row-0>
			<COL_A>I604589</COL_A>
			<COL_B>SignalFire-Lab Rev 1.2 (AT&amp;T)</COL_B>
			<COL_C>1</COL_C>
			<COL_D>-501.47 ml</COL_D>
			<COL_E>0</COL_E>
			<COL_F>0</COL_F>
			<COL_G></COL_G>
		</row-0>
		<row-1>
..... continues on with more rows as needed .....

```

The report layout has a table with column names COL\_A, COL\_B, COL\_C etc. And the NAME/WIDTH/VISIBLE data values are used in the appropriate places of the design properties for each column.

Here’s what the table looks like in the layout designer:  
 ![table_layout](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/8/080b33ad1ae58fca116368e30d25370212c5de3f.png)

And here’s part of the column property settings for column A:  
 ![col_props](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/2/c2c47c5a20f6be3881d5b4bcb37008ba42b10754.png)

Like I said in my other post, it’s a slog. Lots of work for what feels like a very small gain, but it was useful enough that it was worth doing.
