Creating a Report in the Report Designer
Open the report designer.
Select a template – in the sidebar menu, click New via Wizard.
Choose how to create the report:
From scratch – full configuration freedom (Blank report).
Based on a template – quick start, options include:
Blank report – build from scratch.
Table / Vertical / Label / Cross-Tab reports – ready-to-use, flexible elements.
nVision report – least flexible.
Decide whether to use a database.
Set the data source:
Views (require defining relationships, parameters unavailable),
Queries.
Choose the method for working with data:
Query Builder – simpler configuration.
Custom SQL queries – more advanced capabilities.
Add parameters.
Customize the visual layer to your needs.
Creating a Report Using Query Wizard
Goal: Create a simple summary of tickets by category for a selected department.
Creating the basic version of the report:
Open the report designer and select Table report.
Choose Database as the data source.
Set the data source to Queries / Query Builder.
Configure the query by defining data types and relationships:
In the right panel, search for tables and views.
Drag them into the main window.
Create joins between tables.
Select columns for the report.
Click Preview results to check data.
Click OK to confirm the query.
Click Next to proceed.
Define report details by selecting elements to display.
Fine-tune final settings (page parameters and report title).
Save the report:
Press CTRL + S or click Save in the sidebar.
On first save, fill in the dialog provide a description and select a folder.
Modifying Report Appearance
Check the current report layout in the Preview tab.
Go to the Design tab to change the report layout.
Adjust the appearance: change field titles, format dates, adjust column widths.
Edit fields
Select a field you want to edit:
Either in the sidebar panel,
Or in the form under the gear icon.
Format dates
Click the f icon to open the formatting form.
Original value is the column name in square brackets – indicates database data.
To change date format, use functions.
Resize and style fields
Drag edges to resize. In the sidebar, change color, margins, font.
Manage report sections
On the left, you’ll see vertical sections:
Report header (logo, date, title).
Group headers (column names, category headers).
Details (data).
Drag edges to adjust section height.
Add elements to the report
Drag and drop elements (e.g. image, checkbox, table, chart, separator) from the left menu.
Check the report appearance after adjustments.
Save changes
Note the asterisk next to the report name in the bottom tab – indicates unsaved changes.
To make the report more useful, you can add initial parameters to limit the scope of analyzed data. For example, a department name related to the ticket could be such a parameter.
There are two types of parameters:
Report parameters – visible to the user generating the report, selected via interface controls.
Query parameters – variables used in database queries.
Adding a Parameter
Create a department list
Add a new dataset in the sidebar.
Click Add query.
Run the query builder.
Drag the
reports.departmentstable into the main wizard area.Select columns
idandname.Click OK and Finish.
Add a report parameter
In the sidebar, click + in Parameters section.
Fill in the form:
Name – used in the query.
Description – visible in the report.
Type – set to 32-bit number.
Allow null value – check.
Value – remove.
Value source – dynamic list.
Data source – select available.
Data table – set
report_departments.Value member –
id.Display member –
name.
Confirm by clicking OK.
Open the report preview tab
The report now requires department selection before being generated.
Link the parameter to the query
Return to the report design.
In the sidebar, edit the main query.
Launch the query builder.
In the sidebar, open Query properties.
Click the ellipsis in the filter field.
Add condition:
department_id = ?department_id.Confirm filter and query.
Set the query parameter
Click Next.
Show details of department_id parameter
Change parameter type to Expression.
Set result type to 32-bit number.
Remove value
0.Click ellipsis
Select the report parameter by double-clicking
Confirm selection and finish.
Save the report
Use CTRL + S to save all changes.
Creating a Report – Custom SQL Query
Goal: Show frequency of roles (total, activated, deleted) in user groups with two multi-select parameters: group and role.
Select report type and data source
In the report designer, choose Tabular report.
Go to data source settings.
Select Custom SQL query.
Insert SQL query into the editor:
WITH allusers AS ( SELECT report.users.id as id, isactivated, isdeleted, report.usergroups.id as groupid, report.usergroups.name as groupname, report.users.userhelpdeskroleid as roleid, CASE WHEN report.users.userhelpdeskroleid = 0 THEN 'user' WHEN report.users.userhelpdeskroleid = 1 THEN 'staff' WHEN report.users.userhelpdeskroleid = 2 THEN 'admin' END as rolename FROM report.users JOIN report.usersusergroups ON report.users.id = report.usersusergroups.userid JOIN report.usergroups ON report.usersusergroups.usergroupid = report.usergroups.id ) SELECT groupid, groupname, rolename, roleid, COUNT(id) AS total, SUM(CASE WHEN isdeleted = TRUE THEN 1 ELSE 0 END) AS deletedcount, SUM(CASE WHEN isactivated = TRUE THEN 1 ELSE 0 END) AS activatedcount FROM allusers GROUP BY groupid, groupname, rolename, role_idIn the next step select report fields (displayed, grouping, and summary).
Confirm and save
Fill in the report title.
Save changes.
Check report preview.
Prepare data for selection lists in parameters
Add two datasets in the sidebar (for user_groups and user_helpdesk_roles).
Add report parameters
Create two parameters: group and role.
Set options:
Multi-select.
No null value.
Remove default value.
Add conditions to the SQL query:
WHERE( @role_ids = '' OR report.users.user_helpdesk_role_id = any(string_to_array(@role_ids, ',')::int[]) ) AND ( @group_ids = '' OR report.user_groups.id = any(string_to_array(@group_ids, ',')::int[]) )Explanation:
@role_ids,@group_ids– query parameter values.Empty parameter check means selecting all.
string_to_arraysplits values into a list of numbers.any()checks for matches in the list.
Create query parameters
Add parameter
group_ids:Type: Expression.
Result: text created by joining values from the report parameter GroupId (join function).
Add parameter
role_idsin the same way.Customize appearance – change column names, colors, fonts.
Adjust summary fields
Remove unnecessary values.
Change format for readability.
Check the result.
Add rows to the table
Right-click a table cell.
Add rows from the context menu.
Add titles and formatting
Enter parameter names.
Adjust font format.
Display parameter values
Click the function icon.
In the editor, add expression: Iif(Any(?RoleId) == False, GetLocalizedString('All'), GetDisplayText(?RoleId)), so that if role id is not selected, “all” translated into current language is displayed, and if role is selected, role’s name gets displayed.
Add similar expression for the second parameter.
Check the result.