Report Template
Template format
Historian application analyzes all cells whose content is starting with $$ for a potential Historian formulas. The formulas are during the report generation evaluated and replaced by their value. Formula basically consists of a method name and a list of method parameters separated by comma and enclosed in braces. Each argument should be enclosed in quotes. List of supported formulas follow. Quick samples are at the end of the document.
FORMATDATE
- produces formatted date&time information
- supports two-argument syntax
- TIMESTAMP
- FORMAT
- or four-argument syntax
- TIMESTAMP
- NUMBER OF INTERVALS
- INTERVAL_NAME
- FORMAT
VALUEOF
- evaluates the value of particular signal in database for requested timestamp
- supports two-argument syntax
- SIGNAL_NAME
- SIGNAL_TYPE
- TIMESTAMP
- FORMAT
- or four-argument syntax
- SIGNAL_NAME
- SIGNAL_TYPE
- TIMESTAMP
- NUMBER OF INTERVALS
- INTERVAL_NAME
- FORMAT
VALUESOF
- lists a series of values of particular signal during requested time range
- supports nine or ten argument syntax
- SIGNAL_NAME
- SIGNAL_TYPE
- TIMESTAMP_START
- TIMESTAMP_END
- AGGREGATION_METHOD
- AGGREGATION_INTERVAL
- NUMBER OF INTERVALS
- ORIENTATION
- FORMAT
- INCLUDE_HEADER (as of version 1.9.7, optional)
TOTALIZE
- evaluates a totalized value of particular signal during requested time range
- supports six-argument syntax
- SIGNAL_NAME
- SIGNAL_TYPE
- TIMESTAMP_START
- TIMESTAMP_END
- AGGREGATION_METHOD
- AGGREGATION_INTERVAL
- NUMBER OF INTERVALS
- ORIENTATION
- FORMAT
Available constants
- TIME_STAMP
- CURRENT
- START_OF_DAY
- START_OF_MONTH
- START_OF_YEAR
- LAST_DAY
- LAST_MONTH
- LAST_YEAR
- FORMAT
- Date&Time formatting (see https://msdn.microsoft.com/en-US/library... for a complete listings):
- dddd – week day name
- MMMM – month name
- dd – two-digit day number
- MM – two-digit month number
- yy – two-digit year number
- yyyy – four-digit year number
- HH – two-digit hour number (24-hour system)
- mm – two-digit minute number
- ss – two-digit second number
- Numbers formatting (see https://msdn.microsoft.com/en-us/library... for a complete listings):
- 0 – produces whole rounded numbers
- 0.0 – produces numbers rounded to one decimal point
- RAW – cell content is set to exact calculated number
- All other characters should be escaped by preceding slash (eg. “0 \k\g\/\s” for value of 10 produces “10 kg/s”)
- Date&Time formatting (see https://msdn.microsoft.com/en-US/library... for a complete listings):
- INTERVAL_NAME
- SECOND
- MINUTE
- HOUR
- DAY
- MONTH
- YEAR
- AGGREGATION_INTERVAL
- PER_SECOND
- PER_HOUR
- PER_MINUTE
- PER_DAY
- AGGREGATION_METHOD
- Average
- Count
- StdDev
- Variance
- MinimumActualTime
- Minimum
- MaximumActualTime
- Maximum
- Total
- TimeAverage
- Interpolative
- End
- Delta
- Range
- TXP
- TOTALIZE_INTERVAL
- PER_SECOND
- PER_MINUTE
- PER_HOUR
- PER_DAY
- ORIENTATION
- TO_RIGHT
- TO_DOWN
Quick Samples
For a report generated with decisive time 6.12.2016 00:03:00 following formulas will produce values:
Historian Formula | Evaluated value |
---|---|
$$FORMATDATE("LASTDAY", "dddd, dd.MM.yy") | Montag, 05.12.16 |
$$FORMATDATE("CURRENT", "-2", "DAY", "dd.MM.") | 04.12. |
$$VALUEOF("5 0QCA20 CL001","XQ02","START_OF_DAY", "0 \%") | 45 % |
$$VALUEOF("5 0GBK10 FF001Z","XQ03","CURRENT", "-1", "DAY", "0 \m\3") | 2007 m3 |
$$VALUESOF("5 3HAH35 CT001","XQ01","LASTDAY", "START_OF_DAY", "TXP", "PER_HOUR", "1", "TO_RIGHT", "RAW") | (values will be placed in separate cells to the right of the formula cell) 368,8500061; 361,75; 366,75; 367,6000061; 367,1000061; 364,3500061; 364,5499878; 365,2000122; 362,2999878; 370,2000122; 362,75; 363,6499939; 363,2000122; 366,9500122; 362,7000122; 364,4500122; 361,2000122; 366,5; 362,2000122; 363,75; 362,75; 363,9500122; 363; 363,1499939 |
$$TOTALIZE("5 1LBA10 FF902Z", "XQ06", "LASTDAY", "START_OF_DAY", "PER_SECOND", "RAW") | 1527388,482 |