Issue
The Energy Cost Report does not show any data for a source that is known to have the required data. Running another report, such as a Trend Report, shows the desired energy data.
Product Line
ION Enterprise 6.0
Struxureware Power Monitoring 7.0.x
Power Monitoring Expert 7.2.x
Power Monitoring Expert 8.x
Environment
Web Application Reports
Cause
The Energy Cost report looks for specific measurements in a specific order, as defined in the CFG_ItemValue table in the ION_Network database (see FA214149 for a full listing of measurements). It uses the Channel table entries in the ION_Data database to determine which measurement to use for a given source. If a device has had configuration changes such that more than one measurement from the CFG_ItemValue list appears in the Channel table, the Energy Cost report will automatically choose the measurement from the Channel table that appears first in the CFG_ItemValue list, even if this measurement is not the one that has data for the device in the chosen time range.
So if the Energy Cost report is run for a device but returns no data, and you are sure there is energy data for the device, check the Channel table in ION_Data. You can use this query:
USE ION_Data
SELECT * FROM channel WHERE recorderID IN (SELECT ID FROM Recorder WHERE SourceID IN (SELECT ID FROM source WHERE name = '<your device name>'))
This query will produce a column for the device called "IsCurrentConfiguration".
Resolution
*Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio. Databases should be backed up prior to performing this procedure.*
There are a couple of workarounds:
1. Delete the old entries from the Channel table - this is the approach to take if there is no data in the database for these measurements for this source.
USE ION_Data
DELETE FROM channel WHERE recorderID IN (SELECT ID FROM Recorder WHERE SourceID IN (SELECT ID FROM source WHERE name = '<your device name>')) AND IsCurrentConfiguration = 0
2. If there is data then edit the CFG_ItemValue table to modify the order that the measurements are listed. Note that doing this affects all Energy Cost reports run against all devices. The order of measurements in ION_Networkcan be changed by running the following query.
USE ION_Network
-- this will put Active Energy Delivered to the front of the list so it will get used.
UPDATE vCFG_ConfigItems
SET VALUE =
'Active Energy Delivered·Active Energy Delivered+Received·Active Energy Delivered-Received·Active Energy Delivered Rate A·Active Energy Received Rate A·Active Energy Delivered Interval·Active Energy Received Interval'
WHERE Item ='EnergyCost_kWh'