Switch to: V12V11V10V9V8V7V6V5

REPORT Statement

vext_report_stmt                                        -- v6.2
    :    REPORT project_name.report_name
             FROM data_source
             USING data_query
             [AS report_format]
             [PAGES StartPage TO EndPage] 
             [ENCODE BASE64]                           
 
report_format
    : {PDF | HTML | JPG}
 
data_source : character_string_literal_or_var
data_query  : character_string_literal_or_var

Starting from v4.0 Valentina was able to generate reports using Valentina SQL for Valentina databases.

In v6.2 we are introducing REPORT command for generating reports from any datasource supported by Valentina Report engine. Most of this command's parameters are similar to "SELECT ... FOR REPORT" , but there are a couple new ones.

Arguments

data_source

Specifies a datasource which will be used to access the data for report. Read details about datasource here.

data_query

String literal which contains SQL query related to the specified datasource. For example, working with mySQL you should use the syntax of mySQL, working with postgreSQL use the syntax of postgreSQL.

Examples

postgreSQL

REPORT project1.report_1 
FROM 'postgresql://host=127.0.0.1, port=5432, dbname=db1, user=postgres, password=postgres, timeout=0'
USING 'SELECT * FROM T1 WHERE f1 = 5 AND f2 > 100'
AS PDF

SQLite

REPORT project1.report_1 
FROM 'sqlite://c:/somedb.sqlite'
USING 'SELECT * FROM T1 WHERE f1 = 5 AND f2 > 100'
AS PDF

VServer

REPORT project1.report_1 
FROM 'vserver://host=127.0.01, user=sa, pass=sa, dbname=untitled, port=17432, timeout=10, ssl=false'
USING 'SELECT * FROM "T1" WHERE f1 LIKE ''%John%'''
AS HTML