How do I print a report from Xojo when the data / connection is on SQL Server?
For example the following code does not work (probably the VConnection constructor is not correct because in that line it hangs!):
mReport = New VReport
Dim mConnection As VConnection("(local)", "sa", "12345"
mProject = New VProject(mConnection, pvProjectFile)
mReportName = pvReportName
Try
mProject.Open()
mReport = mProject.MakeNewReport(pvReportName, pvDataSource, pvQuery)
catch e as VException
dim errNumber as Integer = e.ErrorNumber
dim errString as String = e.Message
MsgBox "Report Error "+CStr(errNumber)+": "+errString
Self.Close()
Return False
end
Return True