I'm trying to create a report with a timeseries chart.
But I'm having trouble to show the raw values of a historian enabled tag.
This is how I trigger the report:
When the "batch active" tag becomes true, I save the start timestamp in a memory tag.
When the "batch active" tag becomes false, I save the end timestamp in a memory tag, and trigger the report.
Before the "batch active" tag becomes true, Pressure PV has value 20.
Then while the "batch active" tag is true, I change the tag value to 25 and then to 30.
Then, i set the tag "batch active" tag to false.
So:
BEFORE "batch active": Pressure PV=20
WHILE "batch active": Pressure PV=25 and a bit later 30.
But this is what the report shows:
23 -> 25 -> 0
(The tag has never been 23 nor 0.)
But I tried many other settings too, but can't figure it out how to get it working properly.
I don't want to aggregate values, I just need to show the actual values between the timeframe.
This has nothing to do with reporting. You are mis-using the historian. It isn't designed to correlate your "batch active" tag with any other tag. Or any tag with any other tag. It has no way to query your tags with conditions from other tags.
The best you can do with the historian is to query in two layers: first query "batch active" to find the time boundaries of your batches, then repeatedly query your other tags for each time span. Reporting has no tool to do this for you, but you can use a report script to construct it. See this topic if you must use this route:
But the proper solution would be to use transaction groups to record into a conventional database table using your batch active tag as a trigger. Include the other desired data as columns in that transaction group. Then you can use conventional queries to access the data for your report.
{ One other note: the historian's "wide" return format is incompatible with "as stored" results. Use tall format. }
Just take the case where the Batch_Active tag goes false and is recorded in the historian 1 ms before the PV value is read and recorded. The last PV value is 1 ms after your period of interest and so it won't be included in the results.
That's why a row format (t_stamp, PV0, PV1, PV2, PV3, etc.) is so much better and easier to work with.