1. Create an object named 'MyControlM' in the 'Objects' branch of the system tree.
2. Open the ChannelGroup 'System.Workstation.Protocols.Vzljot over TCP.TSR-043 1.ArchiveMonth' in the branches panel (for convenient transfer of channels to 'MyControlM').
a. 'Objects.MyControlM.Start', type 'DT'
b. 'Objects.MyControlM.End', type 'DT'
c. 'Objects.MyControlM.Generate', type 'BOOL'
d. 'Objects.MyControlM.Interval', type TIME
5. Add a report 'Objects.MyControlM.Resources.Reports.Report M' to 'MyControlM'
6. Drag the parameters created by 'dragging' channels in step 3 of this guide with the mouse, holding the left button, from 'MyControlM' to the 'Data_Archive' branch of the report
a. 'Objects.MyControlM.Start', type 'DT';
b. 'Objects.MyControlM.End', type 'DT';
c. 'Objects.MyControlM.Interval', type TIME,
to the report parameters: 'Start', 'End', 'Interval'.
17. Run the project in emulation mode and set the parameters for data selection (I created a form for daily control, see Objects.MyControlD):
a. 'Objects.MyControlM.Start' = January 01, 0001, for example
b. 'Objects.MyControlM.End' = tomorrow, for example
c. 'Objects.MyControlM.Generate' = TRUE
d. 'Objects.MyControlM.Interval' - leave unchanged
18. The report has been created
19. Check the output of all records, i.e., for all dates, by creating a query in the database, for example for the parameter 'V1'
select im.id, im.itemid as [Item ID in MasterSCADA 4D project]
, im.Name as [Controlled parameter name]
, dr.value as [Value]
, datetime(dr.source_time / 10000000 -11644473600, 'unixepoch', '+3 hours') as [Время МСК]
, case im.type when 6 then 'SYSTEM_DINT_PARAM' when 11 then 'SYSTEM_LREAL_PARAM' else '' end as [Value type]
from items as im, data_raw as dr
where dr.archive_itemid = im.id
and im.Name like 'System.Workstation.Protocols.Vzljot over TCP.TSR-043 1.ArchiveMonth.V1%'
and dr.layer = 0
20. To output a report for April, set the parameters as follows:
a. 'Objects.MyControlM.Start' = April 30, 2022, for example
b. 'Objects.MyControlM.End' = April 30, 2022, although, for a report displaying monthly data, I would create a set of controls on the form:
- 'Text Input' for entering the year;
- 'Single/Multiple Selection Tree' for selecting months;
- other elements that will allow generating the report in the required format.