Changes for page 6. Flexible Reports Guide

Last modified by Iaroslav Platonov on 2026/06/08 15:20

From version 46.1
edited by Iaroslav Platonov
on 2026/06/08 15:20
Change comment: There is no comment for this version
To version 43.1
edited by Sergei
on 2025/12/20 12:31
Change comment: Uploaded new attachment "1766251887280-599.png", version {1}

Summary

Details

Page properties
Parent
... ... @@ -1,1 +1,1 @@
1 -CENTO Manuals.WebHome
1 +CENTO onboarding.WebHome
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Iaroslav
1 +XWiki.Sergei
Content
... ... @@ -1,543 +1,298 @@
1 -{{html clean="false"}}
2 -<style>
3 -/* Disable XWiki heading counters */
4 -.doc-content h1::before,.doc-content h2::before,
5 -.doc-content h3::before,.doc-content h4::before,
6 -.doc-content h5::before,.doc-content h6::before { content:none !important; display:none !important; }
7 -.doc-content { counter-reset:none !important; }
1 += CONTENT =
8 8  
9 -/* Reading progress bar */
10 -#rn-prog { position:fixed;top:0;left:0;height:3px;width:0;background:#005AB4;z-index:9999;pointer-events:none; }
3 +{{toc/}}
11 11  
12 -/* Page layout */
13 -.doc-wrap { position:relative; }
14 -.doc-content { margin-right:224px; border-left:1px solid #E8E8E8; border-right:1px solid #E8E8E8; padding:0 32px; }
5 += 1. INTRODUCTION =
15 15  
16 -/* Right TOC */
17 -.doc-toc { position:absolute;top:0;right:0;width:200px;font-size:12.5px;line-height:1.55;padding:20px 0 20px 16px; }
18 -.doc-toc.is-fixed { position:fixed;width:200px;overflow-y:auto;z-index:10; }
19 -.toc-header { display:flex;justify-content:space-between;align-items:center;margin-bottom:10px; }
20 -.toc-header strong { font-size:13px;font-weight:700;color:#222; }
21 -.toc-toggle { background:none;border:none;cursor:pointer;color:#555;font-size:14px;padding:0 2px;line-height:1; }
22 -.toc-toggle:hover { color:#222; }
23 -.doc-toc ul { list-style:none;margin:0;padding:0; }
24 -.doc-toc li { margin:0; }
25 -.doc-toc a { display:block;padding:3px 0;color:#555;text-decoration:none;border-left:2px solid transparent;transition:color .12s; }
26 -.doc-toc a:hover { color:#222;text-decoration:underline; }
27 -.doc-toc a.toc-on { color:#222;font-weight:700;border-left:2px solid #005AB4;padding-left:5px; }
28 -.tl1 > a { font-weight:600;color:#222; }
29 -.tl2 > a { padding-left:14px; }
30 -.tl3 > a { padding-left:26px;font-size:12px; }
7 +CENTO is a multifunctional software platform for data collection, processing, and display. This guide describes the flexible reporting tool in CENTO.
31 31  
32 -/* Typography */
33 -.doc-content h2 { font-size:1.15em;font-weight:700;color:#222;margin:36px 0 10px 0;display:flex;align-items:baseline;gap:7px;scroll-margin-top:16px; }
34 -.doc-content h3 { font-size:1em;font-weight:700;color:#222;margin:22px 0 8px 0;display:flex;align-items:baseline;gap:6px;scroll-margin-top:16px; }
35 -.doc-content p { font-size:.93em;color:#333;line-height:1.75;margin:0 0 12px 0; }
36 -.doc-content ul, .doc-content ol { font-size:.93em;color:#333;line-height:1.75;margin:0 0 12px 0;padding-left:24px; }
37 -.doc-content li { margin-bottom:4px; }
38 -.doc-content strong { color:#222; }
39 -.doc-content code { background:#f5f5f5;border:1px solid #E8E8E8;border-radius:3px;padding:1px 5px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:.82em;color:#222;line-height:1; }
40 -.doc-content pre { background:#f5f5f5;border:1px solid #E8E8E8;border-radius:4px;padding:12px 16px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:.82em;color:#222;overflow-x:auto;margin:8px 0 16px 0;line-height:1.7; }
9 +It is assumed that the user, having read the User's Manual, is already familiar with the basic elements of the CENTO interface.
41 41  
42 -/* Anchor icon */
43 -.anchor-icon { color:#E8E8E8;text-decoration:none;opacity:0;transition:opacity .15s;vertical-align:middle;margin-left:4px;display:inline-flex;align-items:center; }
44 -h2:hover .anchor-icon,h3:hover .anchor-icon { opacity:1; }
45 -.anchor-icon:hover { color:#005AB4; }
11 +Flexible reports in CENTO are designed to create, edit, upload/download Excel reports based on the collected data. This function allows to create reports of any form and composition.
46 46  
47 -/* Callouts */
48 -.note { border-radius:6px;padding:12px 16px;margin:14px 0;border:1px solid transparent; }
49 -.note-info { background:#e1f1f9 !important;border-color:#b3d4ee !important;border-left:4px solid #005AB4 !important; }
50 -.note-warning { background:#fff4ec !important;border-color:#f5cba7 !important;border-left:4px solid #DD5600 !important; }
51 -.note-tip { background:#e5f3df !important;border-color:#b7dba5 !important;border-left:4px solid #73A839 !important; }
52 -.note-hd { font-weight:700;font-size:.85em;display:flex;align-items:center;gap:5px;margin-bottom:5px; }
53 -.note-info .note-hd { color:#003d80 !important; }
54 -.note-warning .note-hd { color:#a03d00 !important; }
55 -.note-tip .note-hd { color:#3d6b1a !important; }
56 -.note-body { font-size:.875em;color:#222 !important;line-height:1.65; }
13 +Flexible reports can be created both within a single time unit (day, month, year) and for a period specified by the user.
57 57  
58 -/* Section index */
59 -.section-index { list-style:disc;padding-left:20px;margin:0 0 20px 0; }
60 -.section-index li { margin-bottom:12px; }
61 -.section-index li a { color:#005AB4;font-weight:600;font-size:.93em;text-decoration:underline; }
62 -.section-index li p { margin:3px 0 0 0;font-size:.875em;color:#333;line-height:1.6; }
15 +The manual contains a description of the following operations:
63 63  
64 -/* Parent topic */
65 -.parent-topic { font-size:.82em;color:#555;margin:18px 0 24px 0;border-top:1px solid #E8E8E8;padding-top:10px; }
66 -.parent-topic a { color:#005AB4; }
17 +* Creating and editing report templates in the web interface;
18 +* Generating reports from templates;
19 +* Viewing and editing created reports;
20 +* Downloading and uploading report files in Excel is supported with version control.
67 67  
68 -/* Inline icons */
69 -img.inline-icon { display:inline-block;height:28px;width:auto;vertical-align:middle;border:1px solid #E8E8E8;border-radius:4px;margin:0 3px;box-shadow:0 1px 2px rgba(0,0,0,.08); }
22 += 2. QUERY LANGUAGE =
70 70  
71 -/* Figures */
72 -.fig { margin:12px auto 24px auto;width:fit-content;max-width:100%; }
73 -.fig img { border-radius:4px 4px 0 0;border:1px solid #E8E8E8;display:block;cursor:zoom-in;max-width:100%;box-shadow:0 1px 4px rgba(0,0,0,.10);transition:box-shadow .15s; }
74 -.fig img:hover { box-shadow:0 3px 12px rgba(0,90,180,.18); }
75 -.fig-cap { font-size:.78em;color:#555;margin:0;padding:5px 8px;background:#f5f5f5;border:1px solid #E8E8E8;border-top:none;border-radius:0 0 4px 4px;display:block;width:100%;box-sizing:border-box; }
24 +== 2.1. General information ==
76 76  
77 -/* Lightbox */
78 -#rn-lb { display:none;position:fixed;inset:0;z-index:9998;background:rgba(0,0,0,.8);cursor:zoom-out;align-items:center;justify-content:center; }
79 -#rn-lb.open { display:flex; }
80 -#rn-lb-wrap { position:relative;cursor:default;max-width:92vw;max-height:90vh; }
81 -#rn-lb-wrap img { max-width:100%;max-height:90vh;border-radius:5px;display:block; }
82 -#rn-lb-x { position:absolute;top:-13px;right:-13px;background:#005AB4;color:#fff;width:26px;height:26px;border-radius:50%;border:none;cursor:pointer;font-size:15px;display:flex;align-items:center;justify-content:center; }
83 -#rn-lb-cap { position:fixed;bottom:18px;left:50%;transform:translateX(-50%);color:#ddd;font-size:.78em;background:rgba(0,0,0,.55);padding:3px 12px;border-radius:14px;pointer-events:none; }
26 +The core of the flexible reports functionality is a query language that enables the extraction of archived data from the database. Excel (.xlsx) files are used to work with this data.
84 84  
85 -/* Back to top */
86 -#rn-top { position:fixed;bottom:60px;right:60px;z-index:9997;width:36px;height:36px;border-radius:50%;background:#005AB4;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transform:translateY(8px);transition:opacity .22s,transform .22s;pointer-events:none;box-shadow:0 2px 8px rgba(0,90,180,.3); }
87 -#rn-top.on { opacity:1;transform:translateY(0);pointer-events:auto; }
88 -#rn-top:hover { background:#0066cc; }
28 + There are two types of files:
89 89  
90 -/* Toast */
91 -.rn-toast { position:fixed;bottom:66px;right:24px;z-index:9999;background:#222;color:#fff;font-size:.74em;padding:4px 11px;border-radius:4px;pointer-events:none;opacity:0;transition:opacity .18s; }
92 -.rn-toast.on { opacity:1; }
30 +* A template is used to define the layout and structure of a report, including queries to archived data.
31 +* A report is a ready–made document generated from a template that contains the data received as a result of filling in the cells.
93 93  
94 -/* Tables */
95 -.rn-table { width:100%;border-collapse:collapse;margin:8px 0 18px 0;font-size:.82em; }
96 -.rn-table th { background:#f5f5f5;text-align:left;padding:7px 10px;font-size:.78em;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#555;border-bottom:2px solid #E8E8E8; }
97 -.rn-table td { padding:7px 10px;border-bottom:1px solid #E8E8E8;color:#333;vertical-align:top;line-height:1.55; }
98 -.rn-table tr:last-child td { border-bottom:none; }
99 -.rn-table tr:hover td { background:#f5f5f5; }
100 -.rn-table code { background:#f0f0f0;border:1px solid #E0E0E0;border-radius:3px;padding:1px 4px;font-size:.88em; }
101 -.tbl-wrap { overflow-x:auto;margin:8px 0 18px 0; }
102 -</style>
33 +The template is generated by the user in .xlsx file and then uploaded via CENTO forms. Queries are entered into the cells of the template, and the system inserts the resulting value into the cell where the query was placed.
103 103  
104 -<div id="rn-prog"></div>
105 -<div id="rn-lb">
106 - <div id="rn-lb-wrap">
107 - <button id="rn-lb-x" onclick="closeLightbox()">&#10005;</button>
108 - <img id="rn-lb-img" src="" alt=""/>
109 - </div>
110 - <div id="rn-lb-cap"></div>
111 -</div>
112 -<button id="rn-top" onclick="window.scrollTo({top:0,behavior:'smooth'})" title="Back to top">
113 - <svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M8 4l5 5H3z"/></svg>
114 -</button>
115 -<div class="rn-toast" id="rn-toast">Link copied &#10003;</div>
35 +Editing of the report template is also available through the web interface, as described in section 3.
116 116  
117 -<div class="doc-wrap">
118 -<div class="doc-content">
119 - <!-- NOTE: Do NOT add <h1> or rn-meta here — XWiki renders title and date natively -->
37 +The template can contain multiple sheets, Excel formulas, charts, conditional formatting, and a summary report. An example of the generated sheet of an .xlsx file is shown in Figure 2.1.
120 120  
121 - <ul class="section-index">
122 - <li><a href="#s-intro">1. Introduction</a>
123 - <p>Overview of the flexible reporting tool in CENTO — purpose, capabilities, and scope.</p></li>
124 - <li><a href="#s-query">2. Query Language</a>
125 - <p>Syntax for extracting archived data: timestamps, query format, aggregation functions, device codes, and tags.</p></li>
126 - <li><a href="#s-templates">3. Managing Report Templates</a>
127 - <p>Uploading, configuring, editing, and deleting report templates in the Flexible Reports window.</p></li>
128 - <li><a href="#s-access">4. Managing Access Rights to Reports</a>
129 - <p>Linking reports to information model objects and configuring role-based access rights.</p></li>
130 - <li><a href="#s-reports">5. Report Management</a>
131 - <p>Generating reports manually and automatically, versioning, downloading, and publishing reports.</p></li>
132 - </ul>
39 +== 2.2. Timestamps ==
133 133  
41 +Timestamps can be specified in the query language. They are designed to transmit information about the date and time associated with the report.  There are four types of timestamps:
134 134  
135 - <h2 id="s-intro">1. Introduction<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-intro')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h2>
43 +**#created** displays the date and time when the report was created.
136 136  
137 - <p>CENTO is a multifunctional software platform for data collection, processing, and display. This guide describes the flexible reporting tool in CENTO.</p>
45 +**#related** displays the date associated with the report (in flexible reports for the period, the timestamp is ignored).
138 138  
139 - <p>It is assumed that the user, having read the User Manual, is already familiar with the basic elements of the CENTO interface.</p>
47 +**#begin** displays the start date of the report period (only for flexible reports for the period).
140 140  
141 - <p>Flexible reports in CENTO are designed to create, edit, upload, and download Excel reports based on collected data. This function allows reports of any form and composition to be created.</p>
49 +**#end** displays the end date of the report period (only for flexible reports for the period).
142 142  
143 - <p>Flexible reports can be created both within a single time unit (day, month, year) and for a period specified by the user.</p>
51 +Each timestamp should be placed in a separate cell.
144 144  
145 - <p>The manual describes the following operations:</p>
146 - <ul>
147 - <li>Creating and editing report templates in the web interface</li>
148 - <li>Generating reports from templates</li>
149 - <li>Viewing and editing created reports</li>
150 - <li>Downloading and uploading report files in Excel format with version control</li>
151 - </ul>
53 +== 2.3. Query format ==
152 152  
55 +The query is divided into 4 parts/groups separated by the ":" symbol.
153 153  
154 - <h2 id="s-query">2. Query Language<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-query')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h2>
57 +For reports for a day, month, and year, the query is built as described in Figure 2.2.
155 155  
156 - <h3 id="s-query-general">2.1. General information<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-query-general')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h3>
59 +[[image:Screenshot 2025-12-10 at 19.43.28.png||height="163" width="519"]]
157 157  
158 - <p>The core of the flexible reports functionality is a query language that enables extraction of archived data from the database. Excel (.xlsx) files are used to work with this data.</p>
61 +Fig.2.2 Query example
159 159  
160 - <p>There are two types of files:</p>
161 - <ul>
162 - <li><strong>Template</strong> &mdash; defines the layout and structure of a report, including queries to archived data.</li>
163 - <li><strong>Report</strong> &mdash; a ready-made document generated from a template that contains the data received as a result of filling in the cells.</li>
164 - </ul>
63 +For example, the query **y-m-d:h10-m00:el-dev-30-ea_imp-3m:sum** consists of the following parts. The last part, "sum," in the example above, is optional.
165 165  
65 +1) **y-m-d:** means that the year, month, and day values from the date** **associated with the report will be inserted into the query (specified when creating the template via the web-interface). Only part of the date associated with the report can be used. For example, **y2024-m-d **means that the month and day should be substituted, while the year (2024) remains fixed as specified in the request. **y2024-m2-d **means that only the day should be substituted with the year set to 2024 and the month set to 2 (February).
166 166  
167 - <p>The template is generated by the user as an .xlsx file and then uploaded via CENTO forms. Queries are entered into the cells of the template, and the system inserts the resulting value into the cell where the query was placed. Editing of the report template is also available through the web interface, as described in section 3.</p>
67 +It is also possible to omit **d (y-m: )**, or omit **m** and **d (y: )**, this means that we are interested in the entire interval (if only the year is specified, then the entire annual interval, if the year and month are specified, then the monthly interval).
168 168  
169 - <p>The template can contain multiple sheets, Excel formulas, charts, conditional formatting, and a summary report. An example of the generated sheet of an .xlsx file is shown in Figure 2.1.</p>
69 +The **d** can also be omitted (**y-m:**), or both **m** and **d** can be omitted (**y: **). This means the entire interval is considered, if only the year is specified, the entire annual interval is used, and if the year and month are specified, the monthly interval is used.
170 170  
171 - <div class="fig">
172 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/1766251887280-599.png" alt="Report template" style="max-width:100%;" onclick="openLightbox(this)"/>
173 - <p class="fig-cap">Figure 2.1. Report template</p>
174 - </div>
71 +**h10-m00** means that the values for the specified hour and minute will be inserted into the query. By omitting seconds, CENTO understands that the entire minute interval is of interest. This means the sample will be from 10:00 to 10:01 (excluding data for 10:01:00, effectively from 10:00:00 to 10:00:59). To make a sample for an hour, write **h10** omitting minutes and seconds. The time does not need to be specified at all, for example, if the interest is in the data for the day. However, to ensure the query is correct, write “*” in place of the time, like this: ~*~*y-m-d::el-dev-30-ea_imp-3m:sum~*~*.
175 175  
176 - <h3 id="s-query-timestamps">2.2. Timestamps<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-query-timestamps')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h3>
73 +The first two parts of the query can be replaced with another, more convenient formula with **#date**, which will be described below.
177 177  
178 - <p>Timestamps can be specified in the query language to transmit information about the date and time associated with the report. There are four types of timestamps:</p>
179 - <ul>
180 - <li><code>#created</code> &mdash; displays the date and time when the report was created.</li>
181 - <li><code>#related</code> &mdash; displays the date associated with the report (in flexible reports for a period, the timestamp is ignored).</li>
182 - <li><code>#begin</code> &mdash; displays the start date of the report period (only for flexible reports for a period).</li>
183 - <li><code>#end</code> &mdash; displays the end date of the report period (only for flexible reports for a period).</li>
184 - </ul>
75 +2) The entry** el-dev-30-ea_imp-3m **has the following parts:
185 185  
77 +* **el** (electricity) is electrical data. Data on other measurements (heat, pressure, emissions, etc.) are requested with the entry **en** (energy);
78 +* **dev-30** (device) is accessing a device with an id 30 for which data needs to be downloaded;
186 186  
187 - <div class="note note-info"><div class="note-hd"><span>&#8505;</span> Note</div><div class="note-body">Each timestamp should be placed in a separate cell.</div></div>
80 +Instead of **dev**, **bg** (billing group) can be used to request data for a billing group, for example, **y-m-d:h10:el-bg-22-30m:sum**
188 188  
189 - <h3 id="s-query-format">2.3. Query format<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-query-format')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h3>
82 +* **ea_imp** is the channel of the device from which the information is taken. The following channels can be used for electricity:
190 190  
191 - <p>The query is divided into 4 parts/groups separated by the <code>:</code> symbol. For reports for a day, month, and year, the query is built as described in Figure 2.2.</p>
84 +* ea_imp - energy A+
85 +* ea_exp - energy A-
86 +* er_imp - energy R+
87 +* er_exp - energy R-
88 +* pa_imp - power A+
89 +* pa_exp - power of A-
90 +* pr_imp - power R+
91 +* pr_exp - power R-
92 +* ra_imp - readings of A+
93 +* ra_exp - readings of A-
94 +* rr_imp - readings of R+
95 +* rr_exp - readings of R-
192 192  
193 - <div class="fig">
194 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.43.28.png" alt="Query format example" style="max-width:100%;" onclick="openLightbox(this)"/>
195 - <p class="fig-cap">Figure 2.2. Query format example</p>
196 - </div>
97 +The specified channels can be renamed to their decryptions in the config.toml configuration file of the sed_channels service.
197 197  
198 - <p>For example, the query <code>y-m-d:h10-m00:el-dev-30-ea_imp-3m:sum</code> consists of the following parts. The last part, <code>sum</code>, is optional.</p>
199 - <ol>
200 - <li>
201 - <p><strong><code>y-m-d:</code></strong> &mdash; means the year, month, and day values from the date associated with the report will be inserted into the query. Only part of the date can be used. For example, <code>y2024-m-d</code> fixes the year to 2024 while substituting month and day. <code>y2024-m2-d</code> fixes the year to 2024, the month to February, and substitutes only the day.</p>
202 - <p>The <code>d</code> can be omitted (<code>y-m:</code>), or both <code>m</code> and <code>d</code> can be omitted (<code>y:</code>), meaning the entire interval is considered: the full annual interval if only the year is specified, or the full monthly interval if the year and month are specified.</p>
203 - <p>The first two parts of the query can be replaced with the <code>#date</code> formula as described in Table 2.3 below.</p>
204 - </li>
205 - <li>
206 - <p><strong><code>h10-m00</code></strong> &mdash; means that values for the specified hour and minute will be inserted. Omitting seconds means the entire minute interval is of interest (from 10:00:00 to 10:00:59). To sample an hour, write <code>h10</code> omitting minutes and seconds. To omit time entirely (e.g. for daily data), write <code>*</code> in place of the time: <code>y-m-d::el-dev-30-ea_imp-3m:sum</code>.</p>
207 - </li>
208 - <li>
209 - <p><strong><code>el-dev-30-ea_imp-3m</code></strong> has the following parts:</p>
210 - <ul>
211 - <li><code>el</code> &mdash; electrical data. Other measurements (heat, pressure, etc.) use <code>en</code> (energy).</li>
212 - <li><code>dev-30</code> &mdash; device with ID 30. Instead of <code>dev</code>, use <code>bg</code> for billing groups (e.g. <code>el-bg-22-30m</code>).</li>
213 - <li><code>ea_imp</code> &mdash; the data channel. Available electricity channels:
214 - <code>ea_imp</code>, <code>ea_exp</code>, <code>er_imp</code>, <code>er_exp</code>,
215 - <code>pa_imp</code>, <code>pa_exp</code>, <code>pr_imp</code>, <code>pr_exp</code>,
216 - <code>ra_imp</code>, <code>ra_exp</code>, <code>rr_imp</code>, <code>rr_exp</code>.</li>
217 - <li><code>3m</code> &mdash; interval. Options include <code>1m</code>, <code>3m</code>, <code>15m</code>, <code>20m</code>, <code>30m</code>, <code>1h</code>, <code>1d</code>, and others supported by the device.</li>
218 - </ul>
219 - <p>For energy (<code>en</code>) measurements, channels are encoded by number: <code>en-dev-30-15-3m</code> requests 3-minute data for channel ID 15 on device 30.</p>
220 - <p>In query formulas, device IDs can be replaced with device codes. Device codes can contain Latin letters, e.g. <code>P22S1Y8</code>. The formula <code>y-m-d1:*:el-dev-201-ea_imp-30m:sum</code> can be written as <code>y-m-d1:*:E123457ea_imp:sum</code>.</p>
221 - </li>
222 - <li>
223 - <p><strong><code>sum</code></strong> &mdash; aggregation function. Available functions: <code>sum</code>, <code>min</code>, <code>max</code>, <code>mean</code>. An optional coefficient can follow: <code>sum-k0.1</code> multiplies the result by 0.1.</p>
224 - </li>
225 - </ol>
99 +When referring to **energy** measurements instead of **electrical**, the channels are encoded with numbers. For example, it would be recorded as **en-dev-30-15-3m**, which represents 3-minute data for the channel with id = 15 in the device with id = 30.
226 226  
101 +Possible interval options include: **1m** for minute data, **3m** for 3-minute data, **15m** for 15-minute data, **20m** for 20-minute data, **30m** for 30-minute data, **1h** for hourly data, **1d** for daily data, **1m** for monthly data, as well as other intervals that the device may return.
227 227  
228 - <p>For flexible <strong>period</strong> reports, use <code>#begin-#end</code> instead of a specific date (<code>y-m-d</code>). For example, <code>#begin-#end:h10-m00:el-dev-30-ea_imp-3m:sum</code> sums the active energy from device 30 from 10:00 at the start to 10:00 at the end of the user-defined period.</p>
103 +**sum** is an aggregating function that, in this case, calculates the sum. In addition to **sum**, other functions may include **min** for minimum, **max** for maximum, and **mean** for average.
229 229  
230 - <p>Period reports also support time offsets by day: <code>#end+2d</code> or <code>#begin-1d</code>. Queries using only <code>#begin</code> or <code>#end</code> will fill the cell with the value for that point in time only.</p>
105 +The aggregating function may be followed by an optional parameter, the coefficient, written as a k number, where the number is the coefficient value, for example, k0.1 (i.e. **sum-k0.1**): the result of query execution will be multiplied by it.
231 231  
232 - <p>The <code>#date</code> formula provides an extended query toolkit. The comparison between <code>y-m-d</code> and <code>#date</code> formats is shown in Table 2.3.</p>
107 +The data request form for flexible period reports is similar to reports for a day, month, or year. However, in the date block at the beginning of the query, instead of a specific date (**y-m-d**), the start and end of the report period are used as **#begin-#end**. For example, the query **#begin-#end:h10-m00:el-dev-30-ea_imp-3m:sum** means that the total active energy value (reception) is requested for the user-defined period from 10:00 a.m. at the beginning of the period (**#begin**) to 10:00 a.m. at the end of the period (**#end**) from a device with ID 30.
233 233  
234 - <div class="tbl-wrap">
235 - <table class="rn-table">
236 - <caption style="text-align:left;font-size:.8em;color:#555;padding:6px 0;font-weight:700;">Table 2.3. Comparative table of y-m-d and #date formulas</caption>
237 - <thead>
238 - <tr>
239 - <th style="min-width:28px;">#</th>
240 - <th>Format with y-m-d</th>
241 - <th>Format with #date</th>
242 - <th>Description</th>
243 - <th>Report type</th>
244 - </tr>
245 - </thead>
246 - <tbody>
247 - <tr><td>1</td><td><code>y-m-d3:*:el-dev-201-ea_imp-30m:sum</code></td><td><code>#date-d3:d:dev-201-ea_imp:sum</code></td><td>Sum of all half-hours on the 3rd day of the month</td><td>monthly, daily</td></tr>
248 - <tr><td>2</td><td><code>y-m-d1:h00-m30:el-dev-201-ea_imp-30m:sum</code></td><td><code>#date-d1-h00-m30:*:dev-201-ea_imp</code></td><td>Value of the 00:30 half-hour on the first day</td><td>monthly, daily</td></tr>
249 - <tr><td>3</td><td><code>y-m-d+1:h00-m30:el-dev-201-ea_imp-30m</code></td><td><code>#date+1-h00-m30:*:dev-201-ea_imp</code></td><td>Value of the 00:30 half-hour of the day following the selected one</td><td>daytime</td></tr>
250 - <tr><td>4</td><td><code>y-m-d+10:h00-m30:el-bg-42-30m</code></td><td><code>#date+10-h00-m30:*:bg-42</code></td><td>Value of the 00:30 half-hour per day +10; checking billing group operation</td><td>daytime</td></tr>
251 - <tr><td>5</td><td><code>y-m-d-1:h00-m30:el-dev-201-ea_imp-30m</code></td><td><code>#date-1-h00-m30:*:dev-201-ea_imp</code></td><td>Value of the 00:30 half-hour per day &minus;1</td><td>daytime</td></tr>
252 - <tr><td>6</td><td><code>y-m-d1-1:h01-m00:el-dev-201-ea_imp-30m</code></td><td><code>#date-d1-1-h01-m00:*:dev-201-ea_imp</code></td><td>Value of the 01:00 half-hour for the last day of the previous month</td><td>monthly, daily</td></tr>
253 - <tr><td>7</td><td><code>y-m-d1-2:h00-m30:el-dev-201-ea_imp-30m</code></td><td><code>#date-d1-2-h00-m30:*:dev-201-ea_imp</code></td><td>Value of the 00:30 half-hour for the penultimate day of the previous month</td><td>monthly, daily</td></tr>
254 - <tr><td>8</td><td><code>y-m-d:*:el-dev-201-ea_imp-30m:sum</code></td><td><code>#date:d:dev-201-ea_imp:sum</code></td><td>Sum of all half-hours for the selected day</td><td>daytime</td></tr>
255 - <tr><td>9</td><td><code>y-m:*:el-dev-201-ea_imp-30m:sum</code></td><td><code>#date:m:dev-201-ea_imp:sum</code></td><td>Sum of all half-hours for the selected month</td><td>annual, monthly, daily</td></tr>
256 - <tr><td>10</td><td><code>y:*:el-dev-201-ea_imp-30m:max</code></td><td><code>#date:y:dev-201-ea_imp:max</code></td><td>The maximum half-hour value for the selected year</td><td>annual, monthly, daily</td></tr>
257 - <tr><td>11</td><td><code>y-m-1m:*:el-dev-201-ea_imp-30m:min</code></td><td><code>#date-1m:m:dev-201-ea_imp:min</code></td><td>Minimum half-hour for the previous month</td><td>annual, monthly</td></tr>
258 - <tr><td>12</td><td><code>y-m1:*:en-dev-220-1021-1h:mean</code></td><td><code>#date-m2:m:ch-1021-1h:mean</code></td><td>Average of all hours from channel 1021 at device 220 for February of the selected year</td><td>annual, monthly, daily</td></tr>
259 - <tr><td colspan="5" style="background:#f5f5f5;font-weight:700;color:#555;">New functions available only with #date</td></tr>
260 - <tr><td>13</td><td>&mdash;</td><td><code>#date-h08-#date-h17:*:dev-201-ea_imp:sum</code></td><td>Sum of energy on the report date from 8:00 to 17:00</td><td>daytime</td></tr>
261 - <tr><td>14</td><td>&mdash;</td><td><code>#date+1-h08-#date+1-h17:*:dev-201-ea_imp:sum</code></td><td>Sum of energy for the following day from 8:00 to 17:00</td><td>daytime</td></tr>
262 - <tr><td>15</td><td>&mdash;</td><td><code>#date-d1-h08-#date+1-h17:*:dev-201-ea_imp:sum</code></td><td>Sum from the 1st of the month at 8:00 to the following day at 17:00</td><td>daytime</td></tr>
263 - <tr><td>16</td><td>&mdash;</td><td><code>#date-d1-1-h08-#date+1-h17:*:dev-201-ea_imp:sum</code></td><td>Sum from the last day of the previous month at 8:00 to the following day at 17:00</td><td>daytime</td></tr>
264 - </tbody>
265 - </table>
266 - </div>
109 +Queries for flexible reports for a period can be generated, indicating only the beginning of the period (**#begin**) or only the end (**#end**). In this case, CENTO will fill the cell with the value only for the specified time, ignoring the formula at the end of the query (if there is one).
267 267  
111 +Flexible period reports also allow time offsets in queries, but **only by day**. For example, **#end+2d** or **#begin-1d**.
268 268  
269 - <h3 id="s-query-examples">2.4. Query examples<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-query-examples')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h3>
270 - <pre><code>y2019-m-d:h10:el-dev-30-ea_imp-3m:sum-k0.001</code></pre>
113 +The formulas described above can be replaced with formulas with **#date**. Using formulas with **#date** to expand the query toolkit. The comparison of queries is performed in Table 2.3. Additional queries are described in lines 13 - 16 in the specified table.
271 271  
272 - <p>Data for 2019, substituting month and day from the report date, time from 10:00 to 11:00, electrical 3-minute data, device ID 30, channel <code>ea_imp</code>, sum aggregation with coefficient 0.001 (result in megawatts).</p>
273 - <pre><code>y-m1:*:en-dev-220-1021-1d:sum</code></pre>
115 +Table 2.3. Comparative table of y-m-d and #date formulas
274 274  
275 - <p>Data for the 1st month of the year from the report date. Energy resources table, daily records, device 220, channel 1021. Since the day is omitted, the full monthly range is sampled (e.g. 2019-01-01 to 2019-02-01, excluding the first day of the second month).</p>
276 - <pre><code>y-m+1-d1:h00-m00:el-dev-1202-ra_imp-30m</code></pre>
117 +|(% style="width:52px" %)**№**|(% style="width:332px" %)**Format with y-m-d**|(% style="width:336px" %)**Format with #date**|(% style="width:461px" %)**Description**|(% style="width:160px" %)**Type of report in which the formula is applied**
118 +|(% style="width:52px" %)1|(% style="width:332px" %)y-m-d3:*:el-dev-201-ea_imp-30m:sum|(% style="width:336px" %)#date-d3:d:dev-201-ea_imp:sum|(% style="width:461px" %)Sum of all half-hours on the 3rd day of the month|(% style="width:160px" %)monthly, daily
119 +|(% style="width:52px" %)2|(% style="width:332px" %)y-m-d1:h00-m30:el-dev-201-ea_imp-30m:sum|(% style="width:336px" %)#date-d1-h00-m30:*:dev-201-ea_imp|(% style="width:461px" %)Value of the half-hour is 00-30 on the first day|(% style="width:160px" %)monthly, daily
120 +|(% style="width:52px" %)3|(% style="width:332px" %)y-m-d+1:h00-m30:el-dev-201-ea_imp-30m|(% style="width:336px" %)#date+1-h00-m30:*:dev-201-ea_imp|(% style="width:461px" %)Value of the half-hour is 00-30 of the day following the selected one|(% style="width:160px" %)daytime
121 +|(% style="width:52px" %)4|(% style="width:332px" %)y-m-d+10:h00-m30:el-bg-42-30m|(% style="width:336px" %)#date+10-h00-m30:*:bg-42|(% style="width:461px" %)Value of the half-hour is 00-30 per day +10; checking the operation of the electro-billing group|(% style="width:160px" %)daytime
122 +|(% style="width:52px" %)5|(% style="width:332px" %)y-m-d-1:h00-m30:el-dev-201-ea_imp-30m|(% style="width:336px" %)#date-1-h00-m30:*:dev-201-ea_imp|(% style="width:461px" %)Value of the 00-30 half-hour per day is -1|(% style="width:160px" %)daytime
123 +|(% style="width:52px" %)6|(% style="width:332px" %)y-m-d1-1:h01-m00:el-dev-201-ea_imp-30m|(% style="width:336px" %)#date-d1-1-h01-m00:*:dev-201-ea_imp|(% style="width:461px" %)Value of the 01-00 half-hour for the last day of the previous month|(% style="width:160px" %)monthly, daily
124 +|(% style="width:52px" %)7|(% style="width:332px" %)y-m-d1-2:h00-m30:el-dev-201-ea_imp-30m|(% style="width:336px" %)#date-d1-2-h00-m30:*:dev-201-ea_imp|(% style="width:461px" %)Value of the half-hour is 00-30 for the penultimate day of the previous month|(% style="width:160px" %)monthly, daily
125 +|(% style="width:52px" %)8|(% style="width:332px" %)y-m-d:*:el-dev-201-ea_imp-30m:sum|(% style="width:336px" %)#date:d:dev-201-ea_imp:sum|(% style="width:461px" %)Sum of all half-hours for the selected day|(% style="width:160px" %)daytime
126 +|(% style="width:52px" %)9|(% style="width:332px" %)y-m:*:el-dev-201-ea_imp-30m:sum|(% style="width:336px" %)#date:m:dev-201-ea_imp:sum|(% style="width:461px" %)Sum of all half-hours for the selected month|(% style="width:160px" %)annual, monthly, daily
127 +|(% style="width:52px" %)10|(% style="width:332px" %)y:*:el-dev-201-ea_imp-30m:max|(% style="width:336px" %)#date:y:dev-201-ea_imp:max|(% style="width:461px" %)The maximum half-hour for a selected year|(% style="width:160px" %)annual, monthly, daily
128 +|(% style="width:52px" %)11|(% style="width:332px" %)y-m-1m:*:el-dev-201-ea_imp-30m:min|(% style="width:336px" %)#date-1m:m:dev-201-ea_imp:min|(% style="width:461px" %)Minimum half-hour for the previous month|(% style="width:160px" %)annual, monthly
129 +|(% style="width:52px" %)12|(% style="width:332px" %)y-m1:*:en-dev-220-1021-1h:mean|(% style="width:336px" %)#date-m2:m:ch-1021-1h:mean|(% style="width:461px" %)Output the average of all hours from channel 1021 at device 220 for February of the year selected by the user|(% style="width:160px" %)annual, monthly, daily
130 +|(% style="width:52px" %) |(% style="width:332px" %) |(% style="width:336px" %)**New functions available only with #date**|(% style="width:461px" %) |(% style="width:160px" %)
131 +|(% style="width:52px" %)13|(% style="width:332px" %) |(% style="width:336px" %)#date-h08-#date-h17:*:dev-201-ea_imp:sum|(% style="width:461px" %)Sum of energy as of the report date from 8 a.m. to 5 p.m.|(% style="width:160px" %)daytime
132 +|(% style="width:52px" %)14|(% style="width:332px" %) |(% style="width:336px" %)#date+1-h08-#date+1-h17:*:dev-201-ea_imp:sum|(% style="width:461px" %)Sum of energy for the day following the reporting day from 8 a.m. to 5 p.m.|(% style="width:160px" %)daytime
133 +|(% style="width:52px" %)15|(% style="width:332px" %) |(% style="width:336px" %)#date-d1-h08-#date+1-h17:*:dev-201-ea_imp:sum|(% style="width:461px" %)Sum of energy from the first day of the month at 8 a.m. to the day following the reporting day at 5 p.m.|(% style="width:160px" %)daytime
134 +|(% style="width:52px" %)16|(% style="width:332px" %) |(% style="width:336px" %)#date-d1-1-h08-#date+1-h17:*:dev-201-ea_imp:sum|(% style="width:461px" %)Sum of energy from the last day of the previous month, 8 a. m. to the day following the reporting one, up to 5 p.m.|(% style="width:160px" %)daytime
277 277  
278 - <p>Data for 00:00 on the 1st of the month following the report date. Electricity readings for device ID 1202. Arithmetic like <code>m+2</code>, <code>m+3</code>, <code>y+5</code> is also supported.</p>
279 - <pre><code>y-m-d1-1:h10-m00:el-dev-1202-ra_imp-30m</code></pre>
136 +== 2.4. Query examples ==
280 280  
281 - <p>Data for 10:00 on the last day of the previous month for device 1202, channel <code>ra_imp</code>, 30-minute database.</p>
282 - <pre><code>#begin-#end:h00-m00:el-dev-46-ea_imp-3m:sum</code></pre>
138 +**y2019-m-d:h10:el-dev-30-ea_imp-3m:sum-k0.001**
283 283  
284 - <p>Data for the period from 00:00 of <code>#begin</code> to 00:00 of <code>#end</code>. Active received energy from device ID 46, summed from 3-minute values.</p>
285 - <pre><code>#begin:h06-m30:el-dev-58-ea_exp-30m</code></pre>
140 +The is data for 2019, the month and day values from the date associated with the report, the time from 10:00 a.m. to 11:00 a.m., data from the electricity table (el) for three minutes (3m), data on the device with id = 30, for the ea_imp channel, apply the sum aggregating function with the coefficient 0.001 (result is in megawatts).
286 286  
287 - <p>Half-hour value starting at 6:30 on the start date of the period. Active energy output from device ID 58.</p>
288 - <pre><code>#end+2d:h02-m00:el-bg-22-30m</code></pre>
142 +**y-m1:*:en-dev-220-1021-1d:sum**
289 289  
290 - <p>Half-hour starting at 2:00, two days after the end of the user-specified period. Data for billing group ID 22, received active energy.</p>
144 +The data is for the 1st month of the year from the date associated with the report. The data is taken from the energy resources table for daily records for device 220 and channel 1021. The day is skipped here, so there will be a selection based on the range of all days from the 1st to the 2nd month. If, for example, the year is 2019, then the range is: from 2019-01-01 to 2019-02-01 excluding the 1st day of the 2nd month.
291 291  
292 - <h3 id="s-query-devices">2.5. Output of device information. Device codes and tags<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-query-devices')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h3>
146 +**y-m+1-d1:h00-m00:el-dev-1202-ra_imp-30m**
293 293  
294 - <p>The following requests display device attributes directly in report cells:</p>
295 - <ul>
296 - <li><code>#dev.201.IP</code> &mdash; displays the IP address of device ID 201. A device code can be used instead of the ID.</li>
297 - <li><code>#dev.201.Name</code> &mdash; displays the device name.</li>
298 - <li><code>#dev.201.VendorNumber</code> &mdash; displays the device serial number.</li>
299 - </ul>
148 +The data is for 00:00 on the 1st of the month following the date associated with the report. This request outputs electricity readings for a device with id = 1202. You can also write **m+2**, **m+3, y+5**, etc.
300 300  
150 +**y-m-d1-1:h10-m00:el-dev-1202-ra_imp-30m**
301 301  
302 - <p>The serial number can also be retrieved from a tag if the device supports it. For example, for a SATEC device queried via Modbus, write <code>y-m-d:*:ti11001</code> where <code>ti11001</code> is the tag code. Any tag from the configuration can be added to flexible reports in the same way.</p>
152 +The data is for10:00 a.m. on the last day of the previous month of the device with Id 1202, the ra_imp channel from the database of 30 minutes.
303 303  
304 - <h2 id="s-templates">3. Managing Report Templates<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-templates')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h2>
154 +**#begin-#end:h00-m00:el-dev-46-ea_imp-3m:sum**
305 305  
306 - <p>Flexible reports are managed in the <strong>Flexible Reports</strong> window, accessible via <strong>Reports &rarr; Flexible Reports</strong>.</p>
156 +The data is for the period from 00:00 of the date **#begin **to 00:00 of the date **#end**. The data is downloaded using the active received energy from the device with ID 46. The value is given as the sum of the three-minute values of the specified interval.
307 307  
308 - <p>A template prepared according to the query language in section 2 is uploaded by clicking the <strong>Create Template</strong> button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.48.07.png" alt="Create Template"/> in the upper-right corner of the template list.</p>
158 +**#begin:h06-m30:el-dev-58-ea_exp-30m**
309 309  
310 - <div class="fig">
311 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.48.44.png" alt="Flexible Report Template Management window" style="max-width:100%;" onclick="openLightbox(this)"/>
312 - <p class="fig-cap">Figure 3.1. Flexible Report Template Management window</p>
313 - </div>
160 +The data of the half-hour starting at 6:30 a.m., the date indicated at the beginning of the requested period. The data is on the output of active energy from a device with ID 58.
314 314  
315 - <p>After clicking <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.48.07.png" alt="Create Template"/> (see Figure 3.1), a dialog box opens. Enter the template name, type, object, and category, then select the Excel template file, configure auto-generation if needed, select a network resource and/or email address for saving automatically generated reports (see Figure 3.2), and click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.49.45.png" alt="Save"/> to complete.</p>
162 +**#end+2d:h02-m00:el-bg-22-30m**
316 316  
317 - <div class="fig">
318 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.50.16.png" alt="Template upload form" style="max-width:100%;" onclick="openLightbox(this)"/>
319 - <p class="fig-cap">Figure 3.2. Template upload form</p>
320 - </div>
164 +The data of the half-hour starting at 2:00 a.m., the date running 2 days after the end of the period requested by the user. The data is requested for the billing group with ID 22 according to the readings of the received active energy.
321 321  
322 - <p>The <strong>template type</strong> can be annual, monthly, daily, or for-the-period (annual, monthly, or daily). It affects the calendar type used when generating reports, availability of auto-generation (only annual, monthly, and daily reports are auto-generated), and the applicability of timestamps and query types described in section 2.</p>
166 +== 2.5. Output of information on devices to the report. Device codes and tags. ==
323 323  
324 - <p>The <strong>Object</strong> field links the report to an information model object, differentiating access rights and filter templates in the table.</p>
168 +The request **#dev.201.IP** displays the IP address of the device with id = 201201 from the configuration in the report. Instead of the device ID, the device code can be specified.
325 325  
326 - <p>The <strong>Category</strong> field enables report generation based on the Balances module.</p>
170 +**#dev.201.Name** displays the device name with id = 201201 from the configuration in the report. Instead of the device ID, the device code can be specified.
327 327  
328 - <p>All templates can be downloaded to a PC using the <strong>Download</strong> button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.50.54.png" alt="Download template"/> and uploaded using the <strong>Select a file</strong> button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.51.40.png" alt="Select a file"/> in the template settings window, which opens by clicking the <strong>Template setup</strong> button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.52.09.png" alt="Template setup"/>.</p>
172 +**#dev.201.VendorNumber** displays the serial number of the device with id = 201 from the configuration in the report. Instead of the device ID, the device code can be specified.
329 329  
330 - <p>A template can be deleted using the <strong>Delete selected</strong> button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.52.40.png" alt="Delete selected"/> after selecting the checkboxes next to the templates in the first column of the template list (see Figure 3.1).</p>
174 +The serial number of the device can also be taken from the tag if the device can output its number according to any protocol. For example, the SATEC device can be queried via Modbus, and the serial number can be retrieved from the **ti11001** tag. To display this tag in the report, write the formula **y-m-d:*:ti11001 **where **ti11001** can be replaced with the tag code. In the same way, add any tags from the configuration to flexible reports.
331 331  
332 - <p>The <strong>Interactive mode</strong> button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.53.19.png" alt="Interactive mode"/> opens the report in the web version of Excel spreadsheets (Figure 3.3).</p>
176 +In query formulas, device IDs can be replaced with device codes. Unlike the id, the code can contain Latin letters, which allows it to encode a lot of useful information. For example, the code P22S1Y8 may mean that the device collects data on PS22 in the first bus section in cell 8. To write the code in the request, add the channel to it, for example, Energy A+, which is encrypted as **ea_imp** by default.
333 333  
334 - <div class="fig">
335 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.53.57.png" alt="Interactive mode" style="max-width:100%;" onclick="openLightbox(this)"/>
336 - <p class="fig-cap">Figure 3.3. Interactive mode</p>
337 - </div>
178 +Thus, the formula **y-m-d1:*:el-dev-201-ea_imp-30m:sum** can be replaced by the formula **y-m-d1:*:E123457ea_imp:sum**. A similar logic applies to all the formulas described above.
338 338  
339 - <p>Interactive mode enables working with the report directly in the web interface without downloading or uploading an Excel file. In this mode, you can view all calculation results, select the display start time, download the report as .xlsx, and edit the report using the <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.54.33.png" alt="Edit"/> button.</p>
180 += 3. MANAGING REPORT TEMPLATES =
340 340  
341 - <p>In editing mode (Figure 3.4), both Excel formulas and CENTO queries within the report can be viewed and edited as described in section 2.</p>
182 +Flexible reports are managed in the Flexible Reports window accessible using the **Reports menu: Reports -> Flexible Reports**.
342 342  
343 - <div class="fig">
344 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.55.19.png" alt="Editing mode" style="max-width:100%;" onclick="openLightbox(this)"/>
345 - <p class="fig-cap">Figure 3.4. Editing mode</p>
346 - </div>
184 +A template generated in accordance with the query language specified in Section 1 is uploaded to the Flexible Reports page (see Figure 3.1) by clicking the (Create Template) button [[image:Screenshot 2025-12-10 at 19.48.07.png||height="27" width="29"]] in the upper-right corner of the template list.
347 347  
348 - <p>Report sheets are shown in the lower-left corner of the editing mode interface for switching between them (new sheets can only be added via Excel when uploading a template). The lower-right corner contains buttons and a zoom slider. To edit a cell&rsquo;s contents, double-click it.</p>
186 +[[image:Screenshot 2025-12-10 at 19.48.44.png||height="402" width="593"]]
349 349  
350 - <p>After editing, save the report <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.55.47.png" alt="Save"/> and switch back to view mode <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2019.56.08.png" alt="Back to view"/> to verify the results. All changes are applied instantly.</p>
188 +Figure 3.1 – Flexible Report Template Management window
351 351  
352 - <h2 id="s-access">4. Managing Access Rights to Reports<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-access')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h2>
190 +After clicking the button [[image:Screenshot 2025-12-10 at 19.48.07.png||height="27" width="29"]] (see Figure 3.1), a download dialog box will open. Enter the template name, type, object, and category in this dialog box. Then, select the template file (Excel file), configure auto generation if needed, select a network resource and/or email address for saving automatically generated reports (see Figure 3.2), and click the button [[image:Screenshot 2025-12-10 at 19.49.45.png||height="23" width="46"]] to complete.
353 353  
354 - <p>Access rights management for flexible reports is based on the information model. The configuration of the information model is detailed in the Information Model Configuration Manual. Depending on the task, a separate structure can be created for flexible reports, or an existing structure can be reused.</p>
192 +[[image:Screenshot 2025-12-10 at 19.50.16.png||height="448" width="493"]]
355 355  
356 - <p>To link a report to an object, open the template editing form (see Figure 3.2) by clicking the template settings button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.11.01.png" alt="Template settings"/> next to a template, and select an information model object in the <strong>Object</strong> field.</p>
194 +Fig.3.2 Template upload form
357 357  
358 - <p>Next, find the selected object in <strong>Settings &rarr; System &rarr; User Access Rights</strong> and use the checkmarks in the <strong>Flexible Reports</strong> row to select which roles will have access to the flexible report bound to the object (Figure 4.1).</p>
196 +The template** **type can be annual, monthly, daily, as well as annual for the period, monthly for the period, and daily for the period. It is selected depending on the requirements for the report. **The template type** affects the type of calendar when generating reports, the possibility of autogeneration (only annual, monthly, and daily reports are automatically generated), as well as the applicability of timestamps and query types in section 2 of this manual.
359 359  
360 - <div class="fig">
361 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.11.53.png" alt="Rights to flexible reports in the user settings" style="max-width:100%;" onclick="openLightbox(this)"/>
362 - <p class="fig-cap">Figure 4.1. Rights to flexible reports in the user settings</p>
363 - </div>
198 +The **Object** field is used to select an object of the information model. Linking a report to an object differentiates access to reports and filter templates in the table.
364 364  
365 - <div class="note note-info"><div class="note-hd"><span>&#8505;</span> Note</div><div class="note-body">Users without roles that have access to flexible reports bound to an object will not see those reports in the list of available templates.</div></div>
200 +The **Category** field is used to generate reports based on the "Balances" module.
366 366  
367 - <h2 id="s-reports">5. Report Management<a class="anchor-icon" href="javascript:void(0)" onclick="copyAnchor('s-reports')" title="Copy link"><svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"/></svg></a></h2>
202 +All the templates can be downloaded to the PC using the "Download" button [[image:Screenshot 2025-12-10 at 19.50.54.png||height="23" width="23"]] and uploaded using the ”Select a file” button [[image:Screenshot 2025-12-10 at 19.51.40.png||height="25" width="229"]] in the template settings window, which opens when clicking on the "Template setup" button [[image:Screenshot 2025-12-10 at 19.52.09.png||height="25" width="26"]].
368 368  
369 - <p>Reports are generated from uploaded templates using the <strong>Create report</strong> button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.12.49.png" alt="Create report"/>. Report generation can be performed in two ways:</p>
370 - <p><strong>1. Manually</strong> &mdash; click the <strong>Create report</strong> button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.12.49.png" alt="Create report"/> in the template row in the Template list. In the pop-up window (Figure 5.1), enter the report name, select <em>In a day</em> or <em>Per interval</em>, and click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.13.37.png" alt="Proceed"/>.</p>
204 +A template can be deleted using the "Delete selected" button [[image:Screenshot 2025-12-10 at 19.52.40.png||height="27" width="27"]] after selecting the checkboxes next to the templates in the first column of the template list (see Figure 3.1).
371 371  
372 - <div class="fig">
373 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.14.18.png" alt="Create report form" style="max-width:100%;" onclick="openLightbox(this)"/>
374 - <p class="fig-cap">Figure 5.1. Create report form</p>
375 - </div>
206 +The **“Interactive mode”** button [[image:Screenshot 2025-12-10 at 19.53.19.png||height="28" width="27"]] enables the report mode in the web interface. When interactive mode is enabled, the report opens in the web version of Excel spreadsheets (Fig. 3.3).
376 376  
377 - <div class="note note-warning"><div class="note-hd"><span>&#9888;</span> Important</div><div class="note-body">When selecting <em>Per interval</em> while creating a report for a day, month, or year, the system generates multiple reports &mdash; one for each day, month, or year within the user-defined interval. In reports for a period (daily, monthly, or annual), the period must always be specified when creating the report.</div></div>
378 - <p><strong>2. Automatically</strong> &mdash; configure auto-generation in the template settings <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.14.58.png" alt="Autogenerate settings"/>. In the pop-up window (Figure 5.2), define the report generation schedule using a Cron expression or the UI-based Cron editor <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.15.23.png" alt="Cron editor"/> (Figure 5.3), then confirm with <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.17.04.png" alt="Confirm"/>.</p>
208 +[[image:Screenshot 2025-12-10 at 19.53.57.png||height="527" width="1094"]]
379 379  
380 - <p>When <strong>Past period</strong> is set, the previous day/month/year is used when generating the report. When <strong>Current period</strong> is set, the current period is used.</p>
210 +Fig.3.3 Interactive mode
381 381  
382 - <p>Automatically generated reports can be saved to a network resource and/or sent by email. Select the corresponding items in the settings window (Figure 5.2).</p>
212 +The interactive mode enables working with the report directly through the web interface without downloading or uploading an Excel file. In this mode, the report and all calculation results can be viewed, the display start time can be selected, the report can be downloaded as an .xlsx file, and the report can be edited using the button [[image:Screenshot 2025-12-10 at 19.54.33.png||height="21" width="68"]].
383 383  
384 - <div class="note note-warning"><div class="note-hd"><span>&#9888;</span> Important</div><div class="note-body"><ul style='margin:4px 0 0 0;padding-left:18px;'><li>When saving to a network resource, the CENTO server must have network access to the specified location.</li><li>To send reports by email, a mail server must be configured in the corresponding CENTO module. Mail server configuration is described in the Setup Manual: Mail Servers.</li></ul></div></div>
214 +In editing mode (see Fig. 3.4), both Excel formulas and CENTO queries within the report can be viewed and edited as described in Section 2 of this manual.
385 385  
386 - <div class="fig">
387 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.17.46.png" alt="Template setup window" style="max-width:100%;" onclick="openLightbox(this)"/>
388 - <p class="fig-cap">Figure 5.2. Template setup window</p>
389 - </div>
216 +[[image:Screenshot 2025-12-10 at 19.55.19.png]]
390 390  
391 - <div class="fig">
392 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/5.3..png" alt="Autogeneration cron rules" style="max-width:100%;" onclick="openLightbox(this)"/>
393 - <p class="fig-cap">Figure 5.3. Autogeneration cron rules</p>
394 - </div>
218 +Fig.3.4 – Editing mode
395 395  
396 - <p>To display reports generated from the selected templates on the right side of the screen (Report list), select the templates in the Template list using the appropriate checkboxes (Figure 5.4). Templates can be filtered by name and type.</p>
220 +In the editing mode interface, report sheets are shown in the lower-left corner, allowing switching between them (however, new sheets can only be added via Excel when uploading a template). The lower-right corner contains buttons and a zoom slider.
397 397  
398 - <div class="fig">
399 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-16%20183447.png" alt="Flexible Reports Manager window" style="max-width:100%;" onclick="openLightbox(this)"/>
400 - <p class="fig-cap">Figure 5.4. Flexible Reports Manager window</p>
401 - </div>
402 402  
403 - <p>A created report can be downloaded <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.19.04.png" alt="Download report"/> in Excel format or deleted <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.19.29.png" alt="Delete report"/> by marking the unwanted report with a checkmark. The generated Excel file preserves all formulas, charts, and cell formatting specified in the template (Figure 5.5).</p>
223 +To edit the contents of a cell, double-click on the cell with the left mouse button.
404 404  
405 - <div class="fig">
406 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-16%20183927.png" alt="Report generated in Excel format" style="max-width:100%;" onclick="openLightbox(this)"/>
407 - <p class="fig-cap">Figure 5.5. Report generated in Excel format</p>
408 - </div>
225 +After editing, the report should be saved [[image:Screenshot 2025-12-10 at 19.55.47.png||height="26" width="77"]] and switched back to view mode [[image:Screenshot 2025-12-10 at 19.56.08.png||height="27" width="120"]] to verify the results. All changes made are applied instantly, allowing immediate result checking.
409 409  
410 - <p>The report manager supports versioning. Clicking the <strong>Copy</strong> button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.20.56.png" alt="Copy report"/> copies the report, adding the suffix &ldquo;&ndash;&nbsp;v1&rdquo;, &ldquo;&ndash;&nbsp;v2&rdquo;, etc. to its name. The new version appears in a nested list under the root report (Figure 5.6) and can be renamed, copied, downloaded, uploaded, or deleted independently.</p>
227 += 4. MANAGING ACCESS RIGHTS TO REPORTS =
411 411  
412 - <div class="fig">
413 - <img src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-16%20184124.png" alt="Nested versions of the generated report" style="max-width:100%;" onclick="openLightbox(this)"/>
414 - <p class="fig-cap">Figure 5.6. Nested versions of the generated report</p>
415 - </div>
229 +Access rights management for flexible reports is based on the information model. The configuration of the information model is detailed in the Information Model Configuration Manual.
416 416  
417 - <p>Report versions can also be created by uploading a previously downloaded and edited Excel file: click the <strong>Download</strong> <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.43.44.png" alt="Download"/> button on the report version, select the file in the pop-up window, and click <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.44.40.png" alt="Upload"/>.</p>
231 +Depending on the task, either a separate structure can be created for flexible reports, or an existing one can be used.
418 418  
419 - <p>Reports created by a user can be hidden from or published to other users using the <strong>Hide/Publish</strong> button <img class="inline-icon" src="https://wiki.centosoftware.com/xwiki/bin/download/CENTO%20Manuals/3.%20Flexible%20Reports%20Guide/WebHome/Screenshot%202025-12-10%20at%2020.45.11.png" alt="Hide/Publish"/>. Hidden reports are visible only to the user who generated them.</p>
233 +To link a report to an object, open the template editing form (see Fig. 3.2) by clicking the template settings button [[image:Screenshot 2025-12-10 at 20.11.01.png||height="33" width="33"]]next to a template, and select an information model object in the Object field.
420 420  
421 - <div class="parent-topic">Parent topic: <a href="[[CENTO Manuals>>doc:CENTO Manuals.WebHome]]">CENTO Manuals</a></div>
235 +Next, find the selected object in the User access rights interface (Settings System – User Access Rights) and use the check marks in the Flexible Reports line to select which roles will have access to the flexible report bound to the object (Fig. 4.1).
422 422  
423 -</div><!-- /doc-content -->
237 +[[image:Screenshot 2025-12-10 at 20.11.53.png||height="437" width="1097"]]
424 424  
425 -<nav class="doc-toc">
426 - <div class="toc-header">
427 - <strong>On This Page</strong>
428 - <button class="toc-toggle" id="toc-tog" title="Collapse">&laquo;</button>
429 - </div>
430 - <ul id="toc-list">
431 - <li class="tl1"><a href="#s-intro" data-toc>1. Introduction</a></li>
432 - <li class="tl1"><a href="#s-query" data-toc>2. Query Language</a></li>
433 - <li class="tl2"><a href="#s-query-general" data-toc>2.1. General information</a></li>
434 - <li class="tl2"><a href="#s-query-timestamps" data-toc>2.2. Timestamps</a></li>
435 - <li class="tl2"><a href="#s-query-format" data-toc>2.3. Query format</a></li>
436 - <li class="tl2"><a href="#s-query-examples" data-toc>2.4. Query examples</a></li>
437 - <li class="tl2"><a href="#s-query-devices" data-toc>2.5. Device codes and tags</a></li>
438 - <li class="tl1"><a href="#s-templates" data-toc>3. Managing Templates</a></li>
439 - <li class="tl1"><a href="#s-access" data-toc>4. Access Rights</a></li>
440 - <li class="tl1"><a href="#s-reports" data-toc>5. Report Management</a></li>
441 - </ul>
442 -</nav>
239 +Figure 4.1 – Rights to flexible reports in the user settings
443 443  
444 -</div><!-- /doc-wrap -->
241 +Users without roles that have access to flexible reports bound to an object will not see those reports in the list of available templates.
445 445  
446 -<script>
447 -(function(){
448 - var bar = document.getElementById('rn-prog');
449 - var top = document.getElementById('rn-top');
450 - window.addEventListener('scroll', function(){
451 - var d = document.documentElement;
452 - var pct = d.scrollTop / (d.scrollHeight - d.clientHeight);
453 - bar.style.width = (pct*100)+'%';
454 - d.scrollTop > 280 ? top.classList.add('on') : top.classList.remove('on');
455 - }, {passive:true});
243 += 5. REPORT MANAGEMENT =
456 456  
457 - var links = Array.from(document.querySelectorAll('[data-toc]'));
458 - var secs = links.map(function(a){ return {el:document.getElementById(a.getAttribute('href').slice(1)),a:a}; }).filter(function(s){return s.el;});
459 - var busy = false;
460 - var obs = new IntersectionObserver(function(entries){
461 - if(busy)return;
462 - entries.forEach(function(e){
463 - if(!e.isIntersecting)return;
464 - var i=secs.findIndex(function(s){return s.el===e.target;});
465 - if(i<0)return;
466 - secs.forEach(function(s){s.a.classList.remove('toc-on');});
467 - secs[i].a.classList.add('toc-on');
468 - var toc=document.querySelector('.doc-toc');
469 - var link=secs[i].a;
470 - toc.scrollTop=link.offsetTop-toc.offsetTop-toc.clientHeight/2+link.clientHeight/2;
471 - });
472 - },{rootMargin:'-8% 0px -60% 0px',threshold:0});
473 - secs.forEach(function(s){obs.observe(s.el);});
474 - links.forEach(function(a){
475 - a.addEventListener('click',function(e){
476 - var id=a.getAttribute('href').slice(1);
477 - var el=document.getElementById(id);
478 - if(!el)return;
479 - e.preventDefault();
480 - busy=true;
481 - secs.forEach(function(s){s.a.classList.remove('toc-on');});
482 - a.classList.add('toc-on');
483 - el.scrollIntoView({behavior:'smooth',block:'start'});
484 - setTimeout(function(){busy=false;},900);
485 - });
486 - });
245 +Reports are generated based on the uploaded templates using the "Create report" button [[image:Screenshot 2025-12-10 at 20.12.49.png||height="26" width="26"]].
487 487  
488 - var tocList=document.getElementById('toc-list');
489 - var togBtn=document.getElementById('toc-tog');
490 - var collapsed=false;
491 - togBtn&&togBtn.addEventListener('click',function(){
492 - collapsed=!collapsed;
493 - tocList.style.display=collapsed?'none':'';
494 - togBtn.textContent=collapsed?'\u00bb':'\u00ab';
495 - });
247 +Report generation can be performed in the following ways:
496 496  
497 - var lb=document.getElementById('rn-lb');
498 - var lbI=document.getElementById('rn-lb-img');
499 - var lbC=document.getElementById('rn-lb-cap');
500 - window.openLightbox=function(img){lbI.src=img.src;lbI.alt=img.alt;lbC.textContent=img.alt;lb.classList.add('open');document.body.style.overflow='hidden';};
501 - window.closeLightbox=function(){lb.classList.remove('open');document.body.style.overflow='';};
502 - lb.addEventListener('click',function(e){if(e.target===lb)closeLightbox();});
503 - document.addEventListener('keydown',function(e){if(e.key==='Escape')closeLightbox();});
249 +**~1. manually** – by clicking the "Create report" button [[image:Screenshot 2025-12-10 at 20.12.49.png||height="26" width="26"]] in the field of the template in the "Template list". In the pop-up window (see Figure 5.1), enter the report name, select **In a day** or **Per interval** for which the report(s) will be generated, and then click the button [[image:Screenshot 2025-12-10 at 20.13.37.png||height="26" width="62"]] to proceed.
504 504  
505 - var toast=document.getElementById('rn-toast');
506 - var t;
507 - window.copyAnchor=function(id){
508 - var url=location.href.split('#')[0]+'#'+id;
509 - if(navigator.clipboard)navigator.clipboard.writeText(url).catch(function(){});
510 - else{var x=document.createElement('textarea');x.value=url;document.body.appendChild(x);x.select();document.execCommand('copy');document.body.removeChild(x);}
511 - toast.classList.add('on');clearTimeout(t);t=setTimeout(function(){toast.classList.remove('on');},1600);
512 - };
251 +[[image:Screenshot 2025-12-10 at 20.14.18.png||height="207" width="532"]]
513 513  
514 - (function(){
515 - var toc=document.querySelector('.doc-toc');
516 - var wrap=document.querySelector('.doc-wrap');
517 - if(!toc||!wrap)return;
518 - var navbar=document.querySelector('.navbar,nav.navbar,#topBar,header');
519 - var navH=navbar?navbar.offsetHeight:0;
520 - var footer=document.querySelector('footer,.xwikifooter,#xwikifooter,.bottombar,.sticky-container');
521 - function update(){
522 - var wr=wrap.getBoundingClientRect();
523 - if(wr.top<=navH){
524 - var footerTop=footer?footer.getBoundingClientRect().top:window.innerHeight;
525 - var h=Math.max(0,Math.min(window.innerHeight,footerTop)-navH);
526 - toc.classList.add('is-fixed');
527 - toc.style.top=navH+'px';
528 - toc.style.left=(wr.right-200)+'px';
529 - toc.style.height=h+'px';
530 - }else{
531 - toc.classList.remove('is-fixed');
532 - toc.style.top=toc.style.left=toc.style.height='';
533 - }
534 - }
535 - requestAnimationFrame(function(){requestAnimationFrame(function(){
536 - update();
537 - window.addEventListener('scroll',update,{passive:true});
538 - window.addEventListener('resize',update,{passive:true});
539 - });});
540 - })();
541 -})();
542 -</script>
543 -{{/html}}
253 +Fig.5.1 – Create report form
254 +
255 +**Important:** When selecting Per interval while creating a report for a day, month, or year, the system will generate multiple reports - one for each day, month, or year within the user-defined interval based on the selected template.
256 +
257 +In reports for a period (daily, monthly, or annual), the period should always be specified when creating the report.
258 +
259 +**2. automatically** – configuring autogeneration in the settings [[image:Screenshot 2025-12-10 at 20.14.58.png||height="32" width="32"]] of the template in the template list. In the pop-up window (see Fig. 5.2), define the report generation schedule by specifying a Cron expression, or use the UI-based Cron editor (opened by clicking the button [[image:Screenshot 2025-12-10 at 20.15.23.png||height="28" width="29"]]) to configure the schedule interactively, then confirm the settings (see Fig. 5.3). When the "Past period" switch is set, the previous day/month/year will be used when generating the report. When the "Current period" switch is set, the current day/month/year will be used when generating the report.
260 +
261 +When generating reports automatically, reports can be saved to a network resource and/or sent by e-mail. To enable these options, select the corresponding items (see Fig. 5.2).
262 +
263 +**Important:**
264 +
265 +* When saving to a network resource, the CENTO server should have network access to the specified location.
266 +* To send reports by e-mail, a mail server should be configured in the corresponding CENTO module. Mail server configuration is described in the Setup Manual: Mail Servers.
267 +
268 +Then, click the button [[image:Screenshot 2025-12-10 at 20.17.04.png||height="27" width="55"]] in the Template setup window.
269 +
270 +[[image:Screenshot 2025-12-10 at 20.17.46.png||height="555" width="496"]]
271 +
272 +Fig.5.2 – Template setup window
273 +
274 +[[image:5.3..png||height="493" width="492"]]
275 +
276 +Fig.5.3 – Autogeneration of cron rules
277 +
278 +To display reports generated using the selected templates on the right side of the screen (Report list), select the templates in the "Template list" by selecting the appropriate checkboxes (see Fig.5.4). Templates can be filtered by name and type.
279 +
280 +[[image:Screenshot 2025-12-16 183447.png]]
281 +
282 +Fig.5.4 – Flexible Reports Manager window
283 +
284 +The created report can be downloaded [[image:Screenshot 2025-12-10 at 20.19.04.png||height="31" width="29"]] in Excel format or deleted [[image:Screenshot 2025-12-10 at 20.19.29.png||height="32" width="31"]] by marking the unwanted report with a checkmark.
285 +
286 +The report created in Excel format is shown in Fig. 5.5. All formulas, charts, and cell formatting specified in the template are preserved in the report file.
287 +
288 +[[image:Screenshot 2025-12-16 183927.png]]
289 +
290 +Fig.5.5 – Report generated in Excel format
291 +
292 +The report manager has tools for maintaining report versioning. When clicking the "Copy" button [[image:Screenshot 2025-12-10 at 20.20.56.png||height="28" width="28"]], the report is copied, and the suffix "- v1", "- v2", etc. is added to its name.
293 +
294 +The created version is included in the nested list under the root report (see Fig.5.6). The new version can be renamed, copied, downloaded, uploaded, or deleted regardless of the original report.[[image:Screenshot 2025-12-16 184124.png]]
295 +
296 +Fig.5.6 – Nested versions of the generated report
297 +
298 +Report versions can also be created by uploading a previously downloaded and edited Excel file. To do this, click the "Download [[image:Screenshot 2025-12-10 at 20.43.44.png||height="24" width="24"]]" button on the report version, select the file of the downloaded version in the pop-up window, and click the button [[image:Screenshot 2025-12-10 at 20.44.40.png||height="26" width="47"]]. Reports created by the user can be hidden and published to other users using the "Hide/Publish" button [[image:Screenshot 2025-12-10 at 20.45.11.png||height="34" width="68"]]. Hidden reports are visible only to the user who generated them.