The Reports menu looks as below:
The form includes:
- ‘Upload report’ button, which uploads an already created report to the form;
- ‘Create report’ button, which allows to create a report;
- ‘Reload’ button, which reloads the report form to update data;
- ‘Export as CSV’ button, which allows to save the created report in the CSV format.
Uploading a report
To upload a created report to the form, click the ‘Upload report’ button, which will open the ‘Choose a report file’ window:
Choose a report from the list and click ‘Select’ to upload the report results to the form:
If the user has the permissions to edit the report, the form will show the following buttons:
- ‘Save’, which allows to save changes made to the report;
- ‘Report configuration’, which opens the ‘Edit report’ window.
The ‘Exit’ button closes the uploaded report.
The Report configuration window includes
- ‘SQL query’ panel serving to display the report configuration as an SQL query;
- ‘Main object name’ panel serving to form the list of fields for a report;
- ‘Conditions’ panel serving to add conditions to the data query.
Creating a report
To create a report, click the ‘Create report’ button, which will open the window for creating a report file:
Using the ‘Create folder’ button a separate directory can be created to store the file of the report: enter the directory name in the respective form:
Then create a report by clicking the ‘Create’ button and enter the file name in the form:
The following ‘Create report’ form will open:
To enter the report parameters, click the ‘Report configuration’ button:
Then choose the main object for the report and click the ‘Main object’ button, which will open the form with a dropdown list of objects:
Select the object from the list and click the ‘Add’ button, thus, uploading the selected object fields onto the report form and displaying the SQL query with the retrieved data table specified.
The panel listing the elements of the selected object contains the fields of the database table (the ORM onbject properties):
- checkbox field, which serves for selecting object fields to be included into the report;
- ‘Related object’ button, which allows to view and add fields of the related object to the report;
- Field containing the object field name in the database (ORM object properties);
- ‘Nickname’ field, which allows to enter the query field alias in case there are fields of various objects with the same names presented in the query;
- ‘Title’ field, which contains the title of the column in the report.
To select fields for the report, check the box next to the field in the list, the SQL query will show the respective fields.
Herewith, the form will show the following buttons:
- ‘Related object’, which allows to add to a related object to one in case the object isn’t directly linked to;
- ‘Clear’, which removes the added objects from a report.
When adding a related object, there appears a window for choosing an object and additional parameters:
The form contains the following dropdown lists:
- ‘Parent field’ - serves to select a field of the parent object, which the new object will be related to
- ‘Related objects’ - serves to select a related object
- ‘Linked field’ - serves to select a field of the parent object, which will be related to the parent one;
- ‘Join type’ - serves to select the type of joint in the query
Upon choosing the values from the dropdown lists, click ‘Add’ to display new fields on the query configuration panel, whilst the SQL query will get updated:
To add conditions to the data query, click the ‘Add element’ on the ‘Conditions’ panel. There will show a window for adding conditions:
The form contains:
- a dropdown list ‘Operator’, which contains the list of operators for choosing the conditions;
- ‘Object’ dropdown list, which contains the list of the objects used in the report;
- ‘Field’ dropdown list, which contains the list of the selected object fields for the condition;
- ‘Value’ fields, which serves to enter the condition value.
Upon filling in the fields, click the ‘Save’ button. The condition will appear in the list on the ‘Conditions’ panel.
The condition may be removed by clicking next to the selected condition.
To edit a condition, use the button by clicking it or double clicking a record in the conditions list to open it.
To update the query, click the button. Changes made to the query will be displayed in the respective panel:
Upon completing the work on the report configuration, the form may be closed and the report results may be viewed on the following form:
Once the report is generated, save the changes using the button.