Página 1 de 1
LoadFromFile, LoadFromString
Publicado: Mié Oct 09, 2013 10:58 am
por a.ilic
The following XFastReport class methods doesn't work, although they return True.
[*] LoadFromFile
[*] LoadFromString
[/list]
For method LoadFromFile( cFile ), I've also tried passing the absolute path to .fr3, but with no success. When designer is shown up, title is Untitled.fr3.
To be shore that problem is not with some older fr3 file, I've created a new one (with your FR version), and then tried to load it. Again, no success.
LoadFromFile, LoadFromString
Publicado: Mié Oct 09, 2013 12:02 pm
por ignacio
Dear Sir,
On our console demo programa I have just change this code on line 128:
:cFilename := ".ReportsBiolife.fr3"
To this:
:LoadFromFile( ".ReportsBiolife.fr3" )
And is working perfectly. Could you do the same test? TIA.
Regards,
LoadFromFile, LoadFromString
Publicado: Mié Oct 09, 2013 1:55 pm
por a.ilic
ignacio wrote on Wed, 09 October 2013 12:02And is working perfectly. Could you do the same test? TIA.
I did the test and it worked perfectly to me too. That led me to the line-by-line compare of your console example code and my code.
The only distinct was the call of Create() method. If not called, these methods won't work.
So, this code won't work:
FUNCTION Main()
LOCAL oFr
oFr := frReportManager():New()
oFr:LoadFromFile("report.fr3")
oFr:DesignReport()
oFr:DestroyFR()
RETURN NIL
This code will:
FUNCTION Main()
LOCAL oFr
oFr := frReportManager():New()
oFr:Create()
oFr:LoadFromFile("report.fr3")
oFr:DesignReport()
oFr:DestroyFR()
RETURN NIL
In documentation you provided with sources and libraries (frx.chm), those methods for loading documents (from file, string, etc.), it's written that they do not require previously calling the Create() method (green filled square). Also, Create() method isn't mentioned in the list of methods.
Is there any reason why Create() method isn't called automatically when instancing the class, through the constructor?
LoadFromFile, LoadFromString
Publicado: Mié Oct 09, 2013 2:16 pm
por a.ilic
Just to add, this code will work too:
FUNCTION Main()
LOCAL oFr
oFr := frReportManager():New()
oFr:LoadFromFile("report.fr3")
oFr:Create()
oFr:DesignReport()
oFr:DestroyFR()
RETURN NIL
Now it's only a question is it really necessary calling the Create() method and when exactly it should be called?
LoadFromFile, LoadFromString
Publicado: Mié Oct 09, 2013 4:23 pm
por ignacio
Hello,
Problem solved. On next release the call to Create() will not be necessary. Thank you for your feedback.
Regards,
LoadFromFile, LoadFromString
Publicado: Mié Oct 09, 2013 4:50 pm
por a.ilic
Hello,
You're welcome and thank you for a quick response.
Regards,
LoadFromFile, LoadFromString
Publicado: Lun Nov 04, 2013 1:20 pm
por a.ilic
ignacio wrote on Wed, 09 October 2013 16:23Hello,
Problem solved. On next release the call to Create() will not be necessary. Thank you for your feedback.
Regards,
Hi,
I would just like to check when approximately this fix will be included in some of future releases? We bought Xailer licence for FR, and with the latest release we can register product only after calling Create() method.
FUNCTION Main()
LOCAL oFr
oFr := TFastReport():New()
oFr:Create()
oFr:SetLicense(FR_LICENSE, XA_LICENSE)
oFr:DesignReport()
oFr:End()
RETURN NIL
Regards
LoadFromFile, LoadFromString
Publicado: Lun Nov 04, 2013 5:05 pm
por ignacio
a.ilic escribió el mié, 09 octubre 2013 10:58The following XFastReport class methods doesn't work, although they return True.
[*] LoadFromFile
[*] LoadFromString
[/list]
For method LoadFromFile( cFile ), I've also tried passing the absolute path to .fr3, but with no success. When designer is shown up, title is Untitled.fr3.
To be shore that problem is not with some older fr3 file, I've created a new one (with your FR version), and then tried to load it. Again, no success.
Please download latest version of FR for Xailer & [x]Harbour from our download area. That problem is produced due the lack of a call to create() method. In Xailer every object is instantiated i two phases: New() and Create(). Between the New() and Create() design properties are set. BTW this is not necessary on other frameworks, so we have modified the classes two avoid this two phases. Please review the code of our console app.
Regards,