Reports - Historical Trends

Working on some report structures for my current project, and I would like to incorporate a trend which will pull “critical” historical data and display it within the pdf report.

What is the easiest why to do this?

I thought it seemed simple enough…BUT

For the historian, you have the option to have the historical data partitioned into tables in the database, if you use the default “month” mode then new tables are created for monthly data. I would like the report to be able to generate any process data over the past year at minimum, at any given time. So if I want to review a process from 6 months ago I can apply some filters and get the report information from 6 months ago. If the historical data is partitioned monthly, is there a method to “link” the historical data from 6 months ago? Seems like you would have to script this, look at the datetime reference in the filter, then determine which monthly data table the datetime would fall, and then grab the data. Of course this could be problematic if the process data falls from month-to-month transition.

Of course you could change the partition to “yearly” but you still have the issue if you want to go back to a previous year’s report.

Is there something built in to the reporting to the data reference that can automatically span these partitioned tables? I assume I’m missing something.

EDIT: Use the “Tag history” binding…I assume this takes care of it?

You would want to accomplish this with scripting. You would use the system.tag.queryTagHistory function. This function will allow you to pull data from the historian, even if it spans across different historical partitions. You could also go the route of creating a tag history binding on a custom property of a dataset type on the report. So you do have a couple options, all of which will query the data across multiple partitions.