1. Jochen Peters
  2. Valentina Reports ADK
  3. Saturday, June 06 2015, 08:08 PM
  4.  Subscribe via email
Hello
where i put Vshared Lib on linux my app is no working it need vshare libs.

where i can download vshare libs for linux ubuntu
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello, Alexis

As I've said before this library is installed into /usr/local/lib/vcomponents folder during the installation of V4RB deb package on Linux.

But be sure to install V4RB of the same version (5.8.5, for example) both to your Mac, where you compile an app, and to Linux, where you run it. Application can't work if a version mismatch occur.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 1
Ruslan Zasukhin Accepted Answer
Also make sure you have see part "Deployment on Linux" for Xojo ADK in WIKI.
It explains how to deploy compiled APP to Linux computers of your users.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 2
Jochen Peters Accepted Answer
Dim data As String
Dim mReport AS New VReport
Dim SqlStr01 As String
Dim sqliteDb As String
Dim vCounts As Integer

SqlStr01=""
'#If TargetMacOS Then
'#if DebugBuild then
'sqliteDb="sqlite://Users/alexiscolon/Documents/http://HomeDev.org/ADG/adgdb.db";
'#ELSE
'DbMain.DatabaseFile = GetFolderItem("C:\ADG\adgdb.db";)
'#endif
'#endif

#If TargetLinux Then
#if DebugBuild then
sqliteDb="sqlite://usr/local/apache2/htdocs/adg/adgdb.db"
Session.projectPath = GetFolderItem( "adgreports.vsp" )
#Else
sqliteDb="sqlite://usr/local/apache2/htdocs/adg/adgdb.db"
#endif
#endif

//sqliteDb="sqlite://Users/alexiscolon/Documents/http://HomeDev.org/ADG\/adgdb.db"

SqlStr01="Select * From PayInfo INNER JOIN SocioInfo on PayInfo.SocioNum = SocioInfo.SocioNum Where Cnt='" + TransId + "'"



Session.mProject = new VProject(Session.projectPath)

Session.mProject.Open()

if Session.mProject <> nil then
vCounts = Session.mProject.ReportCount()
end if
MsgBox "Load Rep OK"

try
mReport = Session.mProject.MakeNewReport("Pagos", sqliteDb, SqlStr01 )
catch e as VException
dim errNumber as Integer = e.ErrorNumber
dim errString as String = e.Message
end


try
data = mReport.PrintToBuffer(EVReportPrintType.kToHTML, 1 ) <<< it crash nil
Exception err as VException
dim errNumber as Integer = err.ErrorNumber
dim errString as String = err.Message
end

HTMLViewer1.LoadPage(data)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 3
Sergey Pashkov Accepted Answer
Here you get VReport instance:



try
mReport = Session.mProject.MakeNewReport("Pagos", sqliteDb, SqlStr01 )
catch e as VException
dim errNumber as Integer = e.ErrorNumber
dim errString as String = e.Message
end



But have you examined this exception, was it thrown?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 4
Jochen Peters Accepted Answer
I have this error when i run the app


Unhandled VException
Message:

Stack:

WebPagos.WebPagos.PrintRec%%o<WebPagos.WebPagos>s
WebPagos.WebPagos.SavePagos%%o<WebPagos.WebPagos>
WebPagos.WebPagos.Toolbar1_ButtonAction%%o<WebPagos.WebPagos>o<WebToolbar>o<WebToolbarButton>
Delegate.IM_Invoke%%o<WebToolbar>o<WebToolbarButton>
AddHandler.Stub.28%%o<WebToolbarButton>
WebToolbar._ExecuteEvent%b%o<WebToolbar>sA1v
WebControl.!_ExecuteEvent%b%ssA1v
WebSession._HandleEvent%%o<WebSession>so<_HTTPServer.HTTPRequestContext>
WebSession._HandleRequest%i4%o<WebSession>so<_HTTPServer.HTTPRequestContext>
WebApplication._HandleHTTPRequest%%o<WebApplication>o<_HTTPServer.HTTPRequestContext>
_CGIGateway.GatewayRequestThread.Event_Run%%o<_CGIGateway.GatewayRequestThread>
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 5
Ruslan Zasukhin Accepted Answer
Unhandled exception, usually means that some try-catch block is missing.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 6
Jochen Peters Accepted Answer
this is my code

Sub PrintRec(TransId As String)

Dim data As String
Dim mReport AS New VReport
Dim SqlStr01 As String
Dim sqliteDb As String
Dim vCounts As Integer

SqlStr01=""
#If TargetMacOS Then
#if DebugBuild then
sqliteDb="sqlite://Users/alexiscolonlugo/Documents/http://HomeDev.org/ADG/adgdb.db";
#ELSE
DbMain.DatabaseFile = GetFolderItem("C:\ADG\adgdb.db";)
#endif
#endif

#If TargetLinux Then
sqliteDb="sqlite://usr/local/apache2/htdocs/adg/adgdb.db"
#endif


//sqliteDb="sqlite://Users/alexiscolon/Documents/http://HomeDev.org/ADG\/adgdb.db"

SqlStr01="Select * From PayInfo INNER JOIN SocioInfo on PayInfo.SocioNum = SocioInfo.SocioNum Where Cnt='" + TransId + "'"

Session.projectPath = GetFolderItem( "adgreports.vsp" )

Session.mProject = new VProject(Session.projectPath)

Session.mProject.Open()

if Session.mProject <> nil then
vCounts = Session.mProject.ReportCount()
end if
//MsgBox "Load Rep OK "+ str(vCounts)

try
mReport = Session.mProject.MakeNewReport("Pagos", sqliteDb, SqlStr01 )
catch e as VException
dim errNumber as Integer = e.ErrorNumber
dim errString as String = e.Message
end


try
data = mReport.PrintToBuffer(EVReportPrintType.kToHTML, 1 )
catch err as VException
dim errNumber as Integer = err.ErrorNumber
dim errString as String = err.Message
end

HTMLViewer1.LoadPage(data)

End Sub
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 7
Sergey Pashkov Accepted Answer
And what about opening a project?
It can throw an exception too, so to be sure you can add try-catch around it and check a message if any.


Session.projectPath = GetFolderItem( "adgreports.vsp" )

Session.mProject = new VProject(Session.projectPath)

Session.mProject.Open()


Maybe the app can't find a VSP file?

It would be much easier to debug your application in Xojo IDE right in Linux. Is it possible?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 8
Jochen Peters Accepted Answer
sqliteDb="sqlite://Users/alexiscolonlugo/Documents/http://HomeDev.org/ADG/adgdb.db";

File "Users/alexiscolonlugo/Documents/http://HomeDev.org/ADG/adgdb.db"; is not open.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 9
Sergey Pashkov Accepted Answer
It should look like this:
sqliteDb="sqlite:///Users/alexiscolonlugo/Documents/http://HomeDev.org/ADG/adgdb.db";;
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 10
Jochen Peters Accepted Answer
same error no works
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 11
Jochen Peters Accepted Answer
the vCounts is = 1
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 12
Sergey Pashkov Accepted Answer
1.
vCounts is = 1

Is it wrong number of reports in your project?

2.
/Users/alexiscolonlugo/Documents/HomeDev.org/ADG/adgdb.db

Is it path on linux system? On linux users' folders are usually located at /home/username

3.
I've prepared a sample project of what you are trying to do,
it works on mac and linux, only a path to SQLite database was different.

SQLite database is located in user's Documents directory.
Project is located near to linux executable.

try
//________________________________________________________________________________
// PREPARE PROJECT

Dim projectPath As FolderItem = GetFolderItem( "sqlite_project.vsp" )
Dim project As VProject = New VProject( projectPath )

project.Open

//________________________________________________________________________________
// PREPARE DATASOURCE

Dim query As String = "SELECT * FROM table1"
Dim datasource As String = "sqlite:///home/user/Documents/sqlite_datasource.db"

//________________________________________________________________________________
// GENERATE REPORT

Dim report As VReport = project.MakeNewReport( "Report_1", datasource, query )

If report = Nil Then
MsgBox( "Report not generated" )
Return
End

//________________________________________________________________________________
// PRINT REPORT

Dim html As String = report.PrintToBuffer( EVReportPrintType.kToHTML, 1 )

HTMLViewer1.LoadPage( html )

catch e as VException
MsgBox( e.ErrorNumber.ToText + ": " + e.Message )
end
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 13
Jochen Peters Accepted Answer
ok
thanks
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 14
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories