Switch to: V12V11V10V9V8V7V6V5

VReports Examples

This section contains few examples that demonstrate how to control Valentina Reports using SQL commands.

NOTE: Report examples are based on prepared Valentina Project file *.vsp, and some local database file (Valentina or SQLite). There is no examples that use DB Servers (mySQL/PostgreSQL/ODBC/Valentina Server) as datasource, because your DB servers just do not have such databases. So it will require some db-admin job.



This example provides a simple report-viewer. It opens .vsp project and shows the list of the reports inside. The user can choose a report then see preview of some report page or generate report into PDF or JPG format or print it directly to printer. Also it is possible to set a couple of predefined parameters

This example uses:

  • prepared Valentina Project file “reports.vsp”
  • a Valentina Database to generate reports (it is created by example on the fly).


  • Valentina Database is very simple, has just table T1 and few records in this table.
  • “General” in the name of this example means that it demonstrates the most general (basic/common) features and the usage of Valentina Reports.
  • This example is sensitive to the locations of files. So it is important, that you run this example with settings “Use Build Folder = false”.


This example is a copy of GeneralOnValentina example but uses a local SQLite database (it is installed by V4RB installer).

This example also uses another form of VProject.MakeNewReport(), which is universal for any datasource. It can work both with local Valentina DB or SQLite, and with remote mySQL, PostgreSQL, Valentina Server or ODBC datasource. Read more about supported datasource formats here.