Excel report, adding a monthly report

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
5 posts • Page 1 of 1
jonred
Posts:36
Joined: Mon Mar 06, 2017 10:24 am

Excel report, adding a monthly report

Post by jonred »

Hi,

In an existing project there is a report that is called daily and shows the electric compsumption and "ON TIME" of some lights by hour and the total of the day.
I was told to add the same report but in a monthly basis and showing each day comsuption and time.
My first approach was to copy the template and configure it to be a monthly report, but when testing it i found that only the first hour of each day is showed and used for the calculation of the total comsuption and times.

Then, i saw that the value of "TIME ON" was saved in the C1 level of an archive compression, and the comsumption was calculated and stored every hour via an script using dpSetTimed. On each case, the configuration "Archive type" of the the DP in the template is set to "HDB directly".
I cthen created a new level of compression, C2 daily for the sum of the C1 TIME1 level. But the result is similar, when creating the monthly report, i can see the first value of energy, but no value of the newly created C2 level.

SO,
I suppose the C2 level is not automaticaly calculated, there is some easy way or i have to create a script to calculate and store it? (the dpSetTimed, perhaps?)
The consumption level is not in an Archive Compressiopn structure, should it not be calculated correctly?
Can´t the excel report calculate the aggregated functions automaticaly from different periods of time?

I expect to have explained my self properly (sorry for mi english)

Thank you very much

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Excel report, adding a monthly report

Post by leoknipp »

When configuring a template for the report you can define which reports are possible with the template.
The report types are configured in Excel at the menu Report --> Configuration --> Report type. At the report type you define where the data is coming from and what the result shall be, e.g. Data = Day values, Result = Monthly value.
At Report --> Configuration --> Basic values the different value types are configured. At this dialog you also have to define at which compression level data can be found for a dp type.
When using the option Report --> Configuration --> Archive Structure you can import the Archive compression settings for a project and then the Basic values will be generated automatically.

If you configure a new compression level the calculation starts with the time when it was configured.
E.g. if you configure a new compression level to calculate daily values at midnight the first calculation wil be made at the next day switch.

With the function dpSetTimed() you can write values with a given timestamp. If a value can be archived with a given timestamp depends on the time range present in the archive and when the configuration was made.
E.g. if a new dp element is added at 2018.03.20 15:00 to the archive you cannot write values with a time stamp earlier than 2018.03.20 15:00. What the first stamp is which can be saved in the archive for a specific dp element you can get by reading the attribute _start.._offline.

Best Regards
Leopold Knipp
Senior Support Specialist

jonred
Posts:36
Joined: Mon Mar 06, 2017 10:24 am

Re: Excel report, adding a monthly report

Post by jonred »

So, it's impossible to generate values in either case (with or without archive compression) before the moment of the creation of the compression?

I mean, the compression and reports where created 2 years ago (i was not in the project at that time), and the values exist there, i tried to group them manually in a file text and it worked.
The data will appear in reports from now on, but there is really no option to get prior data? or write it in the archives? In that case is very unfortunate for me, should I abandon all my hopes?


thank you anyway

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Excel report, adding a monthly report

Post by leoknipp »

If the datapoint structure was created 2 years ago and you can read compressed data with other tools (e.g. the Event Screen) the data is stored in the database.
In this case you should also be able to read data using the Excel report. Then it might be a problem of the Report or template configuration.
When the Report and/or the template was configured has no effect on the timespan of data which can be read using the Excel report.

If you need more detailed information please get in contact with your common WinCC OA support.

Best Regards
Leopold Knipp
Senior Support Specialist

jonred
Posts:36
Joined: Mon Mar 06, 2017 10:24 am

Re: Excel report, adding a monthly report

Post by jonred »

Thank you very much, i'll do as you say

5 posts • Page 1 of 1