I am using a Tag Historian Query to fill a time series chart.
Using Parameters StartDate and EndDate, defaults work as expected.
I set StartDate as "fromMillis(1728534256686)"
I set EndDate as "fromMillis(1728537563688)"
and the chart displays correctly.
When I set the params of a ReportViewer as an Expression binding and set StartDate as fromMillis(1728534256686) and
EndDate as fromMillis(1728537563688)
That sort of problem usually means there's stringification happening somewhere, and java is trying to apply time zones, which are often different between clients and the gateway.
I’ve hard coded the defaults as follows which I believe isolated it from my amateur designing, although there are some relics of attempts to find a way of passing a string to the Tag Historian Query.
This is the report viewer, I was using an expression binding with the fromMillis function to test the ranges because the graph was only showing a day.
The table (background of previous image) in the select screen is populated by this query which applies a string filter to self-managed serial numbers and recipe names.
There's a lot to look at, but your default report Edate (1728537563688) doesn't match your computed endTime (1728616557492).
I'm not surprised you are getting different data.
(Consider not using millis except to catch time zone errors.)
Use a script data source in your report that logs your parameters' actual values and the first and last row from your history. Be aware that any datetime values will be stringified in the gateway timezone when logged.
(I suspect that you have a timezone problem that you are failing to work around by using long milliseconds.)
Consider using a report default start and end time that is obviously not applicable. Just make sure your report parameters are properly computed (log those, too).
Consider not making your own start/end date parameters when there are two standardized parameters there for exactly that purpose.
Preview has a 100-row limit from history, Perspective report viewer does not. Also show your updated tag history query that uses StartDate and EndDate. Make sure there's no use of the original Sdate and Edate anywhere.
Your history query first and last row suggest a timezone error introduced somewhere.
Thankyou for all your help. The results are the same once the limit are removed, although I was hoping for the returned start and end time to be reflected in the timeline graph, it is likely returning the most recent data point before the timespan.
The introduction of timezone error I am unsure how to investigate, the ACDT that is being passed is correct. I can investigate the gateway and see if there is some timezone settings for the historian that are not configured correctly.