Querying Data in a Report
To query data, the mplreport class has the FetchHistory function.
The function takes a single parameter - the AQL function you want to run. Note that this function should not include the call to GETHISTORY. The API will take care of adding that for you. You simply need to include a query that returns a list of ARDI points.
For example, if we wanted to make a report showing every temperature measurement in our system, we could do the following…
thedata = report.FetchHistory("'Temperature' PROPERTYEX ALLPOINTS")
The thedata variable would now contain a AQLHistResponse object.
Next, we'd like to use our historical data in our report.