Wiki source code of 6. Flexible Reports Guide

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

Hide last authors
Iaroslav Platonov 46.1 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; }
Lana 35.1 8
Iaroslav Platonov 46.1 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; }
Lana 3.2 11
Iaroslav Platonov 46.1 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; }
Lana 3.2 15
Iaroslav Platonov 46.1 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; }
Lana 3.2 31
Iaroslav Platonov 46.1 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; }
Lana 3.2 41
Iaroslav Platonov 46.1 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; }
Lana 3.2 46
Iaroslav Platonov 46.1 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; }
Lana 3.2 57
Iaroslav Platonov 46.1 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; }
Lana 3.2 63
Iaroslav Platonov 46.1 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; }
Lana 3.2 67
Iaroslav Platonov 46.1 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); }
Lana 3.3 70
Iaroslav Platonov 46.1 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; }
Lana 3.3 76
Iaroslav Platonov 46.1 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; }
Lana 3.3 84
Iaroslav Platonov 46.1 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; }
Lana 3.3 89
Iaroslav Platonov 46.1 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; }
Lana 3.3 93
Iaroslav Platonov 46.1 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>
Lana 3.3 103
Iaroslav Platonov 46.1 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>
Lana 3.3 116
Iaroslav Platonov 46.1 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 -->
Sergei 44.1 120
Iaroslav Platonov 46.1 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>
Sergei 44.1 133
Lana 3.3 134
Iaroslav Platonov 46.1 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>
Lana 3.3 136
Iaroslav Platonov 46.1 137 <p>CENTO is a multifunctional software platform for data collection, processing, and display. This guide describes the flexible reporting tool in CENTO.</p>
Lana 3.3 138
Iaroslav Platonov 46.1 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>
Lana 3.3 140
Iaroslav Platonov 46.1 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>
Lana 3.3 142
Iaroslav Platonov 46.1 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>
Lana 3.3 144
Iaroslav Platonov 46.1 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>
Lana 3.3 152
153
Iaroslav Platonov 46.1 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>
Lana 3.3 155
Iaroslav Platonov 46.1 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>
Lana 4.3 157
Iaroslav Platonov 46.1 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>
Lana 4.2 159
Iaroslav Platonov 46.1 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>
Lana 4.3 165
166
Iaroslav Platonov 46.1 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>
Lana 4.3 168
Iaroslav Platonov 46.1 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>
Lana 4.3 170
Iaroslav Platonov 46.1 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>
Lana 4.3 175
Iaroslav Platonov 46.1 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>
Lana 4.3 177
Iaroslav Platonov 46.1 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>
Lana 4.3 185
186
Iaroslav Platonov 46.1 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>
Lana 4.3 188
Iaroslav Platonov 46.1 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>
Lana 4.3 190
Iaroslav Platonov 46.1 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>
Lana 4.3 192
Iaroslav Platonov 46.1 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>
Lana 4.3 197
Iaroslav Platonov 46.1 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>
Lana 4.3 226
227
Iaroslav Platonov 46.1 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>
Lana 4.3 229
Iaroslav Platonov 46.1 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>
Lana 4.3 231
Iaroslav Platonov 46.1 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>
Lana 4.3 233
Iaroslav Platonov 46.1 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>
Lana 4.3 267
268
Iaroslav Platonov 46.1 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>
Lana 4.3 271
Iaroslav Platonov 46.1 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>
Lana 4.3 274
Iaroslav Platonov 46.1 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>
Lana 4.4 277
Iaroslav Platonov 46.1 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>
Lana 4.4 280
Iaroslav Platonov 46.1 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>
Lana 4.5 283
Iaroslav Platonov 46.1 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>
Lana 4.5 286
Iaroslav Platonov 46.1 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>
Lana 4.5 289
Iaroslav Platonov 46.1 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>
Lana 4.5 291
Iaroslav Platonov 46.1 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>
Lana 4.5 293
Iaroslav Platonov 46.1 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>
Lana 4.5 300
301
Iaroslav Platonov 46.1 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>
Lana 4.5 303
Iaroslav Platonov 46.1 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>
Lana 4.5 305
Iaroslav Platonov 46.1 306 <p>Flexible reports are managed in the <strong>Flexible Reports</strong> window, accessible via <strong>Reports &rarr; Flexible Reports</strong>.</p>
Lana 4.5 307
Iaroslav Platonov 46.1 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>
Lana 4.5 309
Iaroslav Platonov 46.1 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>
Lana 4.5 314
Iaroslav Platonov 46.1 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>
Lana 4.5 316
Iaroslav Platonov 46.1 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>
Lana 4.5 321
Iaroslav Platonov 46.1 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>
Lana 4.5 323
Iaroslav Platonov 46.1 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>
Lana 4.5 325
Iaroslav Platonov 46.1 326 <p>The <strong>Category</strong> field enables report generation based on the Balances module.</p>
Lana 5.2 327
Iaroslav Platonov 46.1 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>
Lana 5.2 329
Iaroslav Platonov 46.1 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>
Lana 5.2 331
Iaroslav Platonov 46.1 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>
Lana 5.2 333
Iaroslav Platonov 46.1 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>
Lana 5.2 338
Iaroslav Platonov 46.1 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>
Lana 5.2 340
Iaroslav Platonov 46.1 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>
Lana 5.2 342
Iaroslav Platonov 46.1 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>
Lana 5.2 347
Iaroslav Platonov 46.1 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>
Lana 5.2 349
Iaroslav Platonov 46.1 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>
Lana 7.2 351
Iaroslav Platonov 46.1 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>
Lana 7.2 353
Iaroslav Platonov 46.1 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>
Lana 18.2 355
Iaroslav Platonov 46.1 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>
Lana 18.2 357
Iaroslav Platonov 46.1 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>
Lana 18.2 359
Iaroslav Platonov 46.1 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>
Lana 18.2 364
Iaroslav Platonov 46.1 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>
Lana 18.2 366
Iaroslav Platonov 46.1 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>
Lana 18.2 368
Iaroslav Platonov 46.1 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>
Lana 18.2 371
Iaroslav Platonov 46.1 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>
Lana 18.2 376
Iaroslav Platonov 46.1 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>
Lana 18.2 379
Iaroslav Platonov 46.1 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>
Lana 18.2 381
Iaroslav Platonov 46.1 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>
Lana 18.2 383
Iaroslav Platonov 46.1 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>
Lana 18.2 385
Iaroslav Platonov 46.1 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>
Lana 18.2 390
Iaroslav Platonov 46.1 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>
Lana 18.2 395
Iaroslav Platonov 46.1 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>
Lana 18.2 397
Iaroslav Platonov 46.1 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>
Lana 18.2 402
Iaroslav Platonov 46.1 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>
Lana 18.2 404
Iaroslav Platonov 46.1 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>
Lana 18.2 409
Iaroslav Platonov 46.1 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>
Lana 18.2 411
Iaroslav Platonov 46.1 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>
Lana 19.2 416
Iaroslav Platonov 46.1 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>
Lana 19.2 418
Iaroslav Platonov 46.1 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>
Lana 19.2 420
Iaroslav Platonov 46.1 421 <div class="parent-topic">Parent topic: <a href="[[CENTO Manuals>>doc:CENTO Manuals.WebHome]]">CENTO Manuals</a></div>
Lana 19.2 422
Iaroslav Platonov 46.1 423 </div><!-- /doc-content -->
Lana 21.2 424
Iaroslav Platonov 46.1 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>
Lana 21.2 443
Iaroslav Platonov 46.1 444 </div><!-- /doc-wrap -->
Lana 21.2 445
Iaroslav Platonov 46.1 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});
Lana 21.2 456
Iaroslav Platonov 46.1 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 });
Lana 21.2 487
Iaroslav Platonov 46.1 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 });
Lana 21.2 496
Iaroslav Platonov 46.1 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();});
Lana 21.2 504
Iaroslav Platonov 46.1 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 };
Lana 22.2 513
Iaroslav Platonov 46.1 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}}