It appears that there is a pretty serious flaw with the way ProcesBook / WebParts work with AF and especially with summaries on table data references.
Everything is hunky dory with averages, totals etc on PI Point references, but summaries on Table references do not work because only the End Time of the context of the tag in ProcessBook or End Time of a WebPart is passed to the GetValue method.
I have a relational database with data logged each day. I want to be able to do a summary of all values within a time range and I want the timerange to be used to be dynamic based upon the AFTimeContext of the calling application. Typically the range will be Month to date, Year to Date, Start of Production To Date.
The options I see are:
- Copy the data from the source system into PI using RDBMS - would require thousands of tags!
- Hard coding the ranges, I could have an attribute that is based on a PI PE Tag which keeps track of the current Year Start, Current Month Start etc and use that as the reference.
- Write an AF Add-In to ProcessBook which, given an element context and a time range, would call AF GetValue(AFTimeRange) - but that requires additional software to be installed on peoples PC's.
- Create additional linked tables, which do the aggregations directly.
- In WebParts, I can use DataSets to do the SUM query directly. This is not so straightforward for ProcessBook because I don't want the overhead of installing OLEDB Enterprise on everybodies PC.
It would be better if this functionality was supported in the client ptoducts, but it does not appear to be listed in the tech support knowledge base so I am not sure if and when it will be fixed.
I would appreciate any advise on how to get round this issue.