1. Alexis Colon Lugo
  2. Valentina Reports ADK
  3. Sunday, February 10 2019, 05:12 PM
  4.  Subscribe via email
This my Code i have error #611604
what i am doing wrong

Dim RepStrConn As String
Dim mReport AS New VReport
Dim SqlStr01 As String
Dim vCounts As Integer
Dim sPath As String
Dim sFecha As New Date

DbConn.Close

sPath="C:\QbScan\Data\BarDb.sqlite"
SqlStr01=""

RepStrConn="sqlite://host=" + sPath + ""

SqlStr01="Select ItemCode,WhsCode,ScanQty,Locate,Compare From Sap_Whs "

mprojectPath = GetFolderItem( "RepCoolingWhs.vsp" )

mProject = new VProject(mprojectPath)

try
mProject.Open()
catch e as VException
dim errNumber as Integer = e.ErrorNumber
dim errString as String = e.Message

end

if mProject <> nil then
vCounts = mProject.ReportCount()
end if

try
mReport = mProject.MakeNewReport("ScanRep", RepStrConn, SqlStr01 ) <<<<<<<<< Error 611604
catch e as VException
dim errNumber as Integer = e.ErrorNumber
dim errString as String = e.Message
sPath=errString
end


if mReport <> nil then
Dim fName As String
fName="Qb_Scan"+Trim(sFecha.SQLDate) +".pdf"
dim f as folderItem=GetFolderItem( "C:\QbScan\"+fName,folderItem.PathTypeShell)
//Dim dd As Variant
//dd=f.AbsolutePath
// Create temporary file
'dim f as folderItem
'f =getSaveFolderItem( "*.pdf", "report.pdf" ) <=== Esto te permite guardar el pdf donde quieras
///

mReport.PrintToDisk( f, EVReportPrintType.kToPDF, 1 )
For v as Integer=0 to 1000

Next
Comment
There are no comments made yet.
Alexis Colon Lugo Accepted Answer
ok
thanks
that was the problems

now it works
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 1
Alexis Colon Lugo Accepted Answer
ok
let me try
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 2
Sergey Pashkov Accepted Answer
Just noticed, you included "host=" into the datasource string
The database is local, so it shouldn't be there.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 3
Alexis Colon Lugo Accepted Answer
same error
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 4
Sergey Pashkov Accepted Answer
Please try to use different separator:
C:/QbScan/Data/BarDb.sqlite

Or escape the datasource string:
C:\\QbScan\\Data\\BarDb.sqlite
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 5
Alexis Colon Lugo Accepted Answer
Datasource error: "unable to open database file"
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 6
Sergey Pashkov Accepted Answer
Hello Alexis,

This is the error returned by SQLite, so it is necessary to check what does errString contain and what can be wrong with the query.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 7
  • 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