Reports, Data Tag Historian vs system.tag.queryTagHistory()

I noticed that when using Tag Historian Query data source if at tag that did not have a value change within the start and end binding it will contain the value stored out side of the date range.

When using a script data source and below tag to query the tag value I get a null value if there is no data stored within the time range.

system.tag.queryTagHistory(paths=tagPath, startDate=data[‘StartDate’], endDate=data[‘EndDate’], retrunSize= 1000 ,aggregationMode=“MinMax”, columnNames=dataKeyAlias,returnFormat=‘Wide’)

Is there a way to use the script data source but get the same output as the Tag Historian Data source?

I think you need to set includeBoundingValues.
See the docs, system.tag.queryTagHistory - Ignition User Manual 8.1 - Ignition Documentation

@jlandwerlen thanks for pointing that out.

Tuning on includeBoundingValues changes the problem as the t_stamp that gets pulled in from the date that the tag change takes place. This causes the time series chart to display a duration greater than my desired start and end time.

I may need to add a step to go through the history and update the t_stamp to startDate if older than startDate.