menu:reports:create_report
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
menu:reports:create_report [2022/04/26 14:31] – [Email option] yspeerte | menu:reports:create_report [2024/07/03 12:31] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{indexmenu_n> | ||
+ | |||
+ | ====== Create reports ====== | ||
+ | |||
+ | The " | ||
+ | |||
+ | Custom reports are defined in the same manner as the " | ||
+ | |||
+ | Since NetYCE uses a MariaDB database (the open source version of MySQL), the supported SQL syntax has to conform to MySQL 5.x / MariaDB 10.x. The reporting tool will NOT allow you to create SQL queries using the UPDATE, INSERT or DELETE commands. Nor are table manipulations allowed. | ||
+ | |||
+ | Many examples of useable SQL statements for custom reports can be found in the "Build - Relations" | ||
+ | |||
+ | ===== New / Edit report ===== | ||
+ | |||
+ | The the ' | ||
+ | |||
+ | A new report can be created by typing a report name in the box following the ' | ||
+ | |||
+ | Selecting a report using the radio button and then clicking ' | ||
+ | |||
+ | Clicking the ' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | In the edit mode, the report name can be added or changed. When changing a name the currently edited report is actually duplicated so that the user needs to manually delete the report with the old name if that was the intention. | ||
+ | |||
+ | Existing reports already display a ' | ||
+ | |||
+ | Since reports can generate very large number of rows in the resulting output, a limit is imposed on its preview: only the first 5000 rows are displayed. This was done to protect the browser from overloading its host and reduce the upload time. A truncation message is included should that be the case. The stored report results are not truncated or limited in any way. | ||
+ | |||
+ | The report queries do not support variables like ''< | ||
+ | |||
+ | |||
+ | ===== ' | ||
+ | |||
+ | when the ' | ||
+ | |||
+ | Should a history of older reports be desired, the ' | ||
+ | |||
+ | The number of historic reports maintained is configurable using the [[guides: | ||
+ | |||
+ | A warning on creating a longer history and large or many reports is in order here. The report outputs are stored in the ' | ||
+ | |||
+ | |||
+ | |||
+ | ===== 'Email to' option ===== | ||
+ | |||
+ | Once a report is scheduled, it can be emailed automatically after it is executed. Enter one or more email addresses and check the 'email to' checkbox. As a shortcut, the ' | ||
+ | |||
+ | The report will be emailed in CSV format. The email body will list up to 500 of these CSV lines before truncating. Additionally, | ||
+ | |||
+ | The maximum number of CSV lines in the email body can be configured using the [[guides: | ||
+ | |||
+ | Below a sample report as received by email where the limit was set to 5 lines: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | |||
+ | ===== " | ||
+ | |||
+ | As with the " | ||
+ | |||
+ | The syntax is '' | ||
+ | |||
+ | See the article on [[guides: | ||
+ | |||
+ | |||
+ | ===== Encrypted data ===== | ||
+ | |||
+ | The NetYCE database uses several (user-defined) columns in selected tables where the data is stored in encrypted format. See the article on [[guides: | ||
+ | |||
+ | When reporting on these encrypted columns, the permissions of the user creating the report will determine if these columns are decrypted transparently or not. | ||
+ | |||
+ | The permission levels for who this decryption takes place is controlled by a Setup ' | ||
+ | |||
+ | > NOTE: Be aware that a report generated by a user with decryption permissions will be readable by all operators. | ||
+ | |||
+ | |||
+ | |||
+ | ===== Save and schedule ===== | ||
+ | |||
+ | A report is not stored until the '' | ||
+ | |||
+ | Five specifiers are used to schedule the report: ' | ||
+ | |||
+ | If the intention is to run the report manually and fetch the results, select the report and ' | ||
+ | |||
+ | If the intention is to never run the report automatically, | ||
+ | |||
+ | |||
+ | |||
+ | ===== More on schedules ===== | ||
+ | |||
+ | Since the report scheduler deploys the standard unix ' | ||
+ | advanced scheduling functions are made available in the edit reports too. The | ||
+ | crontab options are powerful but require some familiarity. | ||
+ | |||
+ | The Custom reports tool includes a text box with the resulting crontab time | ||
+ | specification after the (basic) choices are made. This text box can then be modified | ||
+ | to include the advanced options as desired. This information is then used to | ||
+ | schedule the report. Incorrect settings are rejected. | ||
+ | |||
+ | The crontab format uses five fields: | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Examples: | ||
+ | 00 12 * * * = daily at noon | ||
+ | 05 04 * * mon = mondays at 04:05 in the morning | ||
+ | </ | ||
+ | |||
+ | The advanced options allow values to be divided, enumerated and ranged: | ||
+ | < | ||
+ | Examples: | ||
+ | */10 * * * * = every 10 minutes | ||
+ | 00 12 * * mon, | ||
+ | */15 7-18 * * mon-fri | ||
+ | </ | ||
+ | |||
+ | ===== Scheduled server ===== | ||
+ | |||
+ | Custom reports definitions are stored in the database (using the YCE.Images table) as are the resulting reports. By using the database for storage the reports can run independent of the NetYCE server and can also be independently of the server be retrieved. | ||
+ | |||
+ | Ans as all NetYCE servers need direct access to one of its databases, the task of generating the reports is automatically distributed evenly over the NetYCE servers present in the setup. As a consequence, | ||
+ | |||
+ | Manual alteration of the server where a report will be executed can be accomplished using the "Admin - Custom data" tool. Select from the YCE database the ' | ||
+ | |||
+ | |||