1. Matteo
  2. Valentina Reports ADK
  3. Donnerstag, Juli 13 2017, 04:56 PM
  4.  Abonnieren via E-Mail
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!
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Ok.
And I reproduced the problem with not thrown exception using your sample, we'll check it.
Kommentar
There are no comments made yet.
Matteo Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Matteo Akzeptierte Antwort
i'll try that right now and let you know quickly !
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
And the project path for debugging is different.
What if you debug with the same path as in release?
Kommentar
There are no comments made yet.
Matteo Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
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?
Kommentar
There are no comments made yet.
Matteo Akzeptierte Antwort
Any news on this please ? All my Win reports are blocked!

Thanks
Kommentar
There are no comments made yet.
Matteo Akzeptierte Antwort
Hi, yes it's 32-bit. All my reports gives the same error, builds for mac works fine
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hello Matteo,

Is the architecture for build set to 32-bit?
Have you tried other reports and all of them not generated?
Kommentar
There are no comments made yet.
  • Seite :
  • 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