I have a number of furnaces, and each has a set of historical tags configured.
I am able to dynamically pull the historical data for any given furnace’s tags by binding the Tag Pens on the Easy Chart component to the following SQL query:
SELECT UPPER(REVERSE(SUBSTRING(REVERSE([tagpath]), 0, CHARINDEX('/', REVERSE([tagpath]))))) as [NAME], [tag_path] AS [TAG_PATH], 'MinMax' AS [AGGREGATION_MODE], 'Default Axis' AS [AXIS], 1 AS [SUBPLOT], 1 AS [ENABLED], '' AS [DASH_PATTERN], 1 AS [RENDER_STYLE], 1 AS [LINE_WEIGHT], 0 AS [SHAPE], 1 AS [FILL_SHAPE], 0 AS [LABELS], '' AS [GROUP_NAME], 0 AS [DIGITAL], 0 AS [OVERRIDE_AUTOCOLOR], 0 AS [HIDDEN], 1 AS [USER_SELECTABLE], '' AS [SORT_ORDER], 0 AS [USER_REMOVABLE] FROM [dbo].[sqlth_te] WHERE [retired] IS NULL AND UPPER([tagpath]) LIKE (SELECT UPPER ([device_path]) FROM [dbo].[tb_furnace] WHERE [sid] = ?) + '%' ORDER BY [NAME] ASC;
While this is straightforward, I have found that the Timeseries Chart or even the XY Chart on the reports must be hardcoded; I haven’t found a way to pull the Pens dynamically.
I’d like to simply pass the id of the furnace onto the Timeseries Chart and have that populate dynamically like I’m doing for the Easy Chart.
Is it possible?