To configure the export settings for query reports, go to: Navigation bar → SQL stats → Edit SQL stats.
See also: Create / Edit query reports
The following options are currently available for easy export of the query reports:
Email delivery, HTTPS retrieval (PULL), HTTPS export (PUSH), and FTP/SFTP.
You can configure the file format in the File format section.
To ensure that the file can be read correctly in other systems, you can specify the file format for a CSV export. The following settings are available.
File name
You can specify the name of the CSV file to be exported. Variables can be used optionally. If you do not specify a file name, the name of the SQL report is automatically used as the file name.
Optional variables:
_DATE_YMD_HHMMSS_ for timestamp_UNIXTIME_ for Unix time _VAR_COLUMN_NAME_ for column contentsThe file extension .xml also allows you to provide the CSV structure as an Excel file.
Character set / encoding
Determines the text encoding of the CSV file. UTF-8 is the standard and supports international characters. If you encounter problems with umlauts or special characters, you can select other encodings such as ISO-8859-1 (Latin-1) or Windows-1252 (ANSI).
Field separator
Specifies which character separates the individual data fields (columns) from each other. Frequently used options are:
Field encloser
Defines whether text fields are enclosed by special characters. Important for texts with line breaks or if the field separator itself appears in the text. If field delimiters appear in the text, they are automatically doubled (escaped).
Line break
Determines how line ends and breaks are marked in the file:
Additional options
You can activate the additional options by checking the respective checkbox:
These settings ensure that CSV files can be interpreted and imported correctly.

Optionally, you can use export transformation code to provide other file formats for automatic export, such as JSON or XML.
In the Connections area, you can specify how and where the results of your query reports are automatically sent.
The following settings are available for sending fully automated, personalized emails from your laboratory database with dynamic content and attachments based on your SQL report data:
Email address
Enter one or more email addresses (separated by commas).
The recipient address can be stored permanently or filled with a dynamic variable, e.g., VAR_AN. The variable is filled from the columns of the SQL report data—for this, the SQL report must contain a column “To,” then the variable _VAR_AN_ is automatically replaced by the content of the column.
Of course, CC/BCC are also available.
Subject and text
The subject and text of the email can also optionally contain variables from the SQL report, which are automatically replaced by values from the corresponding columns of the SQL report. Variables begin with _VAR_, use uppercase letters and underscores instead of spaces.
Sending options
In the drop-down menu below the text field for the email text, you can specify whether one e-mail is sent per SQL report or one e-mail per SQL report line.
Add attachments
You have several options for attaching data. Activate the appropriate option by checking the respective checkbox.
Add the link to this export interface as attachment to the e-mail text.:
Inserts a link to the online view of the original SQL report into the email text, which is useful if the email is sent to users of the laboratory database.
Attach the result of this export as a file to the e-mail.:
Attaches the complete SQL report result as a file to the email. If necessary, the file name can be inserted dynamically into the email text using the variable _FILENAME_. The file settings should be defined in advance in the ‘File format’ section.
Attach file (uploads or PDFs) line by line to each email.:
Attaches files (uploads or PDFs) line by line to each email.
Requires a column with upload_id_for_download_link==123 for signed reports or quotes.
Alternatively, a column with one of the following options to attach PDFs:pdf_datatype==invoice==x - Invoices (with invoices.id)pdf_datatype==offer==x - Offers (with offer.id)pdf_datatype==report==x - Reports (with reports.id)pdf_datatype==order_worksheets==x==y - Worksheets (with orders.id and designs.id)pdf_datatype==sample_worksheets==x==y - Sample worksheets (with samples.id and designs.id)pdf_datatype==onlineorder==x - Online orders (with onlineorders.id)pdf_datatype==problem==x - Problem reports (with problems.id)
In addition, it is possible to send generated files (e.g., .ics/.xls) line by line.
This requires three columns in the SQL report:

The emails will then be sent according to your configuration as soon as you click the gray “Send file by email” button above the SQL report.
Optionally, you can preview your email in advance.
To do this, go to “Email preview” below the email send button and click on the drop-down menu.
A preview window will open with the following information (with the resolved variables, if applicable):

All emails sent by the Labordatenbank can be found under: Navigation bar -> Customers -> Outgoing messages
You can save the results of a SQL report on an SFTP server.


Once your account has been activated, you can choose whether a PDF file should be stored on the server.
Select the “Generate and upload PDF file line by line” checkbox.
Below the checkbox, the syntax used in the SQL report is described in order to make the respective data types available for export.
If this checkbox is not activated, the export will be carried out as defined in the “File format” section.
In the Enterprise Cloud version of the laboratory database, you also have the option of scheduling the export to run at a specific time or defining an automatic trigger for the SFTP export, for example, the signing of a test report.
Click on “Test SFTP/FTP connection” to check the connection to the server.

The file is always transferred when you click the gray “Send file to SFTP server” button above the SQL report.

With the HTTP PUSH function, you can send the result of an SQL report as a JSON data record to a web service of your choice.
Enter the URL of the target web service
The export of files via HTTP PUSH can be activated by entering the target address, including username/password, in the field provided.
_VAR_COLUMN_NAME__VARProbeNO_HTTPS header
Additional headers can be specified in the “HTTP header” field.
HTTPS method
The default method for HTTP export is POST, but you can also use the PUT method.
Webservice Response Handler
A response from the HTTPS endpoint can be processed using Webservice Response Handler and JavaScript code.
Registration with P12 certificate (optional)
For registration at the HTTPS endpoint, we offer you the option of storing a P12 certificate in your SQL report.

To send the data record, click on the gray “Send dataset” button in your SQL report.

HTTP PULL enables external systems to retrieve SQL report data on request. Your appropriately configured SQL report provides a web service endpoint that other systems can query.
To make files available via HTTPS PULL, select the “Enable HTTP authentication” button and define a user name and password in the following window.
Optionally, you can set an IP address restriction in this step.


Obtain URL for file retrieval
If data transfer via HTTPS pull is enabled, the links that external systems can use to retrieve the SQL report are displayed.
This SQL report data can now be retrieved as a CSV file or JSON file via the links displayed after entering the user name and password, e.g.:
URL for CSV retrieval: https://labordatenbank.com/demo/stats/view/327/https
URL for JSON retrieval: https://labordatenbank.com/demo/stats/view/327/https_json
Forward the URL to the external system that is to access your SQL report.
The retrieval URL with key can be generated using the SQL report and links to an SQL report view that is also visible to users who are not logged in.

Last change: 20.10.2025
Allgemeines
AI Funktionen
Mitarbeiter
Berichte
Berichtstabellen Editor
Schnittstellen
Einführungsphase
Auswertungen
Aufträge
Proben
Probenvorlage
Kunden
Kundenzone (optional)
Anlagen
Angebote
Rechnungen
Parameter
Rechnen mit Parametern
Webservice
Transformationscode
Prüfpläne / Grenzwerte / Spezifikationen
Dokumentenlenkung
Material
Fragen und Antworten
Prüfmittel
Mitarbeiterschulungen
8D-Report
Sonstiges
PDF-Vorlagen
Lieferantenbewertung
Dateiverwaltung
Prozesse