1. Matteo
  2. Valentina Reports ADK
  3. Thursday, July 13 2017, 04:56 PM
  4.  Subscribe via email
Hello, i'm trying to print from a Xojo Windows app and keep getting the error 365829 - File "UNKNOWN" is not open.
If i debug the app it works correctly but once i build it the error is returned.

This error is returned when i try to create the report like

mReport = mProject.MakeNewReport(reportName, "mysql://host="+host+", port=3306, user="+dbUser+", password="+dbPassword+", dbname="+db+", timeout=30", query)

Any hint ?

Thanks!
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello Matteo,

Is the architecture for build set to 32-bit?
Have you tried other reports and all of them not generated?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 1
Matteo Accepted Answer
Hi, yes it's 32-bit. All my reports gives the same error, builds for mac works fine
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 2
Matteo Accepted Answer
Any news on this please ? All my Win reports are blocked!

Thanks
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 3
Sergey Pashkov Accepted Answer
Hello Matteo,

I'm trying to reproduce it right now, but reports work for me.

This error is usually thrown if the project wasn't opened before generating a report.
But if in debug it works with the same parameters - that's strange, the code is the same in V4RB.

Is the latest version of V4RB used (7.3.3)?
Is it the desktop application?
A project is local and resides on disk, no other running application can use it, right?

Did you check VProject.Open method call - maybe there is some exception which is not shown?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 4
Matteo Accepted Answer
Hello Sergey,

yes, i'm using the 7.3.3 in a desktop (32-bit) application and the project file is in the resource folder.
My print code resides in a Class called ValentinaReport that in the constructor has the following code


Valentina.InitReports(self.macKey, self.winKey, self.linuxKey)

try

#if TargetMacOS Then
self.mProject = New VProject(app.ExecutableFile.Parent.Parent.Child("Resources").Child(self.reportFile))
#endif

#if TargetWin32 Then
self.mProject = New VProject(GetFolderItem("").Child("Resources").Child(self.reportFile))
#endif

#If DebugBuild Then
self.mProject = New VProject(GetFolderItem(self.reportFile))
#endif

self.mProject.Open()

Exception err as VException
MsgBox Str(err.ErrorNumber) + ":" + err.Message
end Try


and i do not see any exception here..

Thanks for your support.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 5
Sergey Pashkov Accepted Answer
And the project path for debugging is different.
What if you debug with the same path as in release?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 6
Matteo Accepted Answer
i'll try that right now and let you know quickly !
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 7
Matteo Accepted Answer
Ok, Sergey, i'm a certified idiot. Xojo has switched Win resources folder name from "Resources" to "%AppName% Resources" and i didn't noticed that.
Don't know why i didn't get an exception while opening the project.

Anyway, sorry to have wasted your time, and thanks a lot for the support.

Matteo.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 8
Sergey Pashkov Accepted Answer
Ok.
And I reproduced the problem with not thrown exception using your sample, we'll check it.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 9
  • 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. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories