The goal of this functionality is to provide the ability to create custom queries to any entity in the application and select any data.
Very often, requests are received to make a selection from several entities at the same time and display data in one table, or to make some kind of summary report that displays data in a given format. All these tasks will help to solve the report designer.
To create new report page, go to Extension - Report Designer and click button Create.
In report form enter report name. If report assign to Entity then it will be displayed on record page and you can use
[current_item_id] in mysql queries.
You can configure access to report for users group or single user.
On Filters tab enable available filters for report. If filter enable you can use
[filter_by_date] in mysql queries.
Creating HTML Blocks
Once report created we have to add HTML blocks which will be used in report. Click on HTML Blocks link and then click to the button "Add" to add new block.
This type of block allows you to embed your PHP code into the report. In the code, you can use database queries and output the results in your own format. See the example below.
Table (MySQL query)
This block type allows you to create your own database query and display the data in a tabular format.
Once Table block created click on it's name to add columns.
Note: in columns you can also use PHP code to add your own calculation in table. Variable
$item contain all data that selected in query.
Once all HTML blocks created, click on report name to prepare report body. You can use HTML editor or enter pure html code.