Variables in query reports

This document describes how to use variables and selection fields in query reports to modify data and time periods without altering the SQL code, and how to integrate these variables into URLs for various export formats.

You can change data with checkboxes above the SQL report without adjusting the SQL code.

For this purpose, you will find four variables for free configuration in the Variables area.
Under Name you assign the name that is to be displayed above the SQL report for this variable.
With Default you assign a standard value which is preset and with Type you can determine which basis the selection option has. So for orders for orders or samples for samples or just a simple drow down list with comma separated values.

You now integrate the variable defined in this way into the query report with e.g._VAR0_.
Attention: If you do not integrate the variable into the query, the selection fields above the SQL report remain, but have no effect on the SQL report.

Variables for the period
To make a time period adjustable, simply integrate the following code into the query report at a date field:

BETWEEN
_FROMDATE_ AND _TILLDATE_

You can then run the SQL report according to your desired time periods.

Integration of variables in URL
If you wold transmit the variables in the url, the url is shown like this:

typ code example
html /stats/view/STAT_ID?s=1&var0=_VAR=_&var1=_VAR1_ /stats/view/507?s=1&var0=11069%2C11070&var1=test
pdf /stats/view/STAT_ID/pdf?s=1&var0=_VAR=_&var1=_VAR1_ /stats/view/507/pdf?s=1&var0=11069%2C11070&var1=test
csv /stats/view/STAT_ID/csv?s=1&var0=_VAR=_&var1=_VAR1_ /stats/view/507/csv?s=1&var0=11069%2C11070&var1=test
json /stats/view/STAT_ID/json?s=1&var0=_VAR=_&var1=_VAR1_ /stats/view/507/json?s=1&var0=11069%2C11070&var1=test

Last change: 06.11.2025

General information

Interfaces

Kompetenzen

AI functions

Employees

Reports

Report table editor

Introductory phase

Query reports

Orders

Samples

Templates

Customers

Client zone (optional)

Assets

Offers

Invoices

Parameters

Calculating with parameters

Webservices

Transformationscode

Test plans / limit values / specifications

Documents control

Material

Questions and answers

Equipment

Trainings

8D-report

Others

PDF templates

Supplier evaluation

File management

Processes