1. Jochen Peters
  2. Valentina Reports ADK
  3. 土, 6月 06 2015, 08:08 PM
  4.  メールで購読
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
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
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.
コメント
There are no comments made yet.
Ruslan Zasukhin 承諾済みの回答
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.
コメント
There are no comments made yet.
Jochen Peters 承諾済みの回答
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)
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
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?
コメント
There are no comments made yet.
Jochen Peters 承諾済みの回答
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>
コメント
There are no comments made yet.
Ruslan Zasukhin 承諾済みの回答
Unhandled exception, usually means that some try-catch block is missing.
コメント
There are no comments made yet.
Jochen Peters 承諾済みの回答
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
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
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?
コメント
There are no comments made yet.
Jochen Peters 承諾済みの回答
sqliteDb="sqlite://Users/alexiscolonlugo/Documents/http://HomeDev.org/ADG/adgdb.db";

File "Users/alexiscolonlugo/Documents/http://HomeDev.org/ADG/adgdb.db"; is not open.
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
It should look like this:
sqliteDb="sqlite:///Users/alexiscolonlugo/Documents/http://HomeDev.org/ADG/adgdb.db";;
コメント
There are no comments made yet.
Jochen Peters 承諾済みの回答
same error no works
コメント
There are no comments made yet.
Jochen Peters 承諾済みの回答
the vCounts is = 1
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
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
添付ファイル
コメント
There are no comments made yet.
Jochen Peters 承諾済みの回答
ok
thanks
コメント
There are no comments made yet.
  • ページ :
  • 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. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories