In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

LoadFromFile, LoadFromString

FastReport for Xailer & [x]Harbour (English/Spanish)
Responder
a.ilic
Mensajes: 37
Registrado: Vie Sep 27, 2013 1:13 am

LoadFromFile, LoadFromString

Mensaje 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.
Aleksandar Ili?
Software developer
Wings Software
http://www.wings.rs
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9252
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

LoadFromFile, LoadFromString

Mensaje 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,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
a.ilic
Mensajes: 37
Registrado: Vie Sep 27, 2013 1:13 am

LoadFromFile, LoadFromString

Mensaje 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?
Aleksandar Ili?
Software developer
Wings Software
http://www.wings.rs
a.ilic
Mensajes: 37
Registrado: Vie Sep 27, 2013 1:13 am

LoadFromFile, LoadFromString

Mensaje 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?
Aleksandar Ili?
Software developer
Wings Software
http://www.wings.rs
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9252
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

LoadFromFile, LoadFromString

Mensaje por ignacio »

Hello,
Problem solved. On next release the call to Create() will not be necessary. Thank you for your feedback.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
a.ilic
Mensajes: 37
Registrado: Vie Sep 27, 2013 1:13 am

LoadFromFile, LoadFromString

Mensaje por a.ilic »

Hello,
You're welcome and thank you for a quick response.
Regards,
Aleksandar Ili?
Software developer
Wings Software
http://www.wings.rs
a.ilic
Mensajes: 37
Registrado: Vie Sep 27, 2013 1:13 am

LoadFromFile, LoadFromString

Mensaje 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
Aleksandar Ili?
Software developer
Wings Software
http://www.wings.rs
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9252
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

LoadFromFile, LoadFromString

Mensaje 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,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Responder