Hi,
I am using the files from GeneralOnVSQLite example to understand how to get a VReport. The SQLite is in the VSQLite Server and the reports.vsp is in local. This is my code in Xojo Project:
[App]
- Close Event Handler
Valentina.ShutDownClient()
- Open Event Handler
Valentina.InitClient()
mProjectPath = getFolderItem( "reports.vsp" )
If mProjectPath.Exists Then
mProject = new VProject(mProjectPath)
mProject.Open()
Else
MsgBox("The report does not exist."
End If
//Connect to vsqlite server
gClient = true //Server Mode
If gClient = true Then
vconnect="vsqlite_server://host=82.223.82.22 port=15532 dbname='reports_db.sqlite' user='xxx' password='yyy'"
Else
End If
[Global Properties]
Dim gClient As Boolean
Dim mProject As VProject
Dim mProjectPath As FolderItem
Dim mReport As VReport
Dim vconnect As String
[Print button: Action Event]
try
mReport = mProject.MakeNewReport(1, vconnect, "SELECT * FROM T1" //VException: ErrorNumber 365829
exception err as VException
dim errNumber as Integer = err.ErrorNumber
dim errString as String = err.Message
end
if mReport <> nil then
dim f as FolderItem = GetSaveFolderItem("*.pdf", "my_report.pdf"
mReport.PrintToDisk( f, EVReportPrintType.kToPDF )
//launch the file in the default viewer on your system for _.pdf_ files
f.Launch
end if
Could you help me, please?. What I am doing wrong?
Thank you very much.
Sergio