Transaction Group Reporting Parameters

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,

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:

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

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.

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?

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

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:

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

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):

<?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

And here’s part of the column property settings for column A:
col_props

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.

1 Like