I create a container and a button and this is the following instruction I did :
try
//Open Connection
dim conn as VConnection = new VConnection("127.0.0.1","username","password")
conn.Open
//Open Valentina Project
dim projPath as FolderItem = GetFolderItem("ercdtt.vsp")
dim proj as VProject = new VProject(conn,projPath)
proj.Open
//Print Report into PDF to RAM
dim datasource as String = "mysql://host='localhost' port='3306' dbname='database' user='username' password='password'"
dim query as String = "Select * from dtt_timerDayPartsReportPopeyes85901"
dim report as VReport = proj.MakeNewReport("DayPartPopeyes",datasource, query)
dim data as string =report.PrintToBuffer(EVReportPrintType.kToPDF, 1 )
// Preparate the file for Download
mPDF = new WebFile
mPDF.MIMEType = "application/pdf"
mPDF.Filename = "report.pdf"
mPDF.ForceDownload = False
mPDF.Data = data
//Close Project and Connection
proj.Close
conn.close
// Show PDF in Browser
showURL(mPDF.URL)
exception err as VException
dim errNumber as Integer = err.errorNumber
dim errString as String = err.Message
end
Xojo build the project good and I have the valentina project(vsp) in the same folder os my web app. When I click the button nothing happen. I already see the video in you tube of Valentina in Xojo Web APP.
Any Ideas?
Thanks