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.

Transition from Sergeys FR

FastReport for Xailer & [x]Harbour (English/Spanish)
Responder
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Transition from Sergeys FR

Mensaje por ignacio »

Reinaldo Crespo escribió el mie, 06 noviembre 2013 20:14
Hi. I'm trying to transition from Sergey's FastReports to newly published Xailer's fastreports for xharbour. As much as I like the good job you've done with the documentation, I'm still not sure how to set certain properties. I do not mind changing from Sergey's syntax to a more object oriented syntax.
(1) Would you please show how you would set each of these properties using the object's native oop syntax?
::oFrPrn := TFastReport():New //frReportManager():New()
WITH OBJECT ::oFrPrn
:SetProperty( "PdfExport", "OverWritePrompt", .F. )
:SetProperty( "PdfExport", "Compressed", .F. )
:SetProperty( "PdfExport", "OpenAfterExport", .F. )
:SetProperty( "PdfExport", "Author", "PathLabs(c) Ver 10 by Structured Systems Corp" )
:SetProperty( "PdfExport", "Subject", "Report Attached" )
:SetProperty( "PdfExport", "Creator", "www.structuredsystems.com" )
:SetProperty( "PdfExport", "Producer", TUser():CurrentUser() )
:SetProperty( "PdfExport", "ProtectionFlags", "[ePrint,eCopy]" ) // **btw -this doesn't work with new xailer's fastreports.
:SetProperty( "PdfExport", "ShowProgress", .T. )
END
(2) I'm getting a runtime error when trying to add a report:
detailed error description
---------------------------
Warning BASE/1004 Message not found: TFASTREPORT:ADDREPORT
(1) The syntax is correct. Is the way to do it. About the error with ProtectionFlags, try this:
#define ePrint 8
#define eModify 4
#define eCopy 2
#define eAnnot 1
::oFastReport1:SetProperty( "PdfExport", "ProtectionFlags", nOr( ePrint, eCopy ) )
(2) I'm afraid that method is not supported and is already specified on the documentation:

Best regards,

Attached files
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
reinaldocrespo
Mensajes: 11
Registrado: Mar Oct 29, 2013 1:49 am

Transition from Sergeys FR

Mensaje por reinaldocrespo »

From the highlighted documentation it is not obvious that method AddReport() has been removed. Does that mean that a report preview only works as modal dialog? Is it possible to display a report and allow control to return the calling app without having to close the report preview? Is it possible to have more than one report preview open at the same time? If so, how?
Here are other questions:
As I try to recompile my existing apps with frx instead of Sergey's frh, I face a few problems that seem to be compatibility related.
(1) DestoryFR() method seems to be missing.
(2) all my existing reports **and perfectly working reports with frh*** now under frx will fail with a runtime error stating that the alias is not available:
detailled error description
---------------------------
Error FASTREPORT/301 TFastReport Error: Alias PracticeInfo not available.
Here is the reduced code to that report:
nReport := :AddReport()
:SetWorkArea( "PracticeInfo",Select( oMdSys:cAlias ),, { FR_RB_CURRENT, FR_RB_CURRENT, 1 } )
LoadFR3Report( oFrPrn, cRepName )
:PreviewOptions:SetModal( .T. )
:ShowReport()
:RemoveReport( nReport )
:ClearDataSets()
Reinaldo.
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Transition from Sergeys FR

Mensaje por ignacio »

(0)
oReport:oPreviewOptions:lModal := .f.
BTW, sorry but is absolutely obvious that those methods are not supported in the documentation.
(1) DestoryFR() method seems to be missing.
CLASS frReportManager FROM TFastReport
METHOD New( cFile ) CONSTRUCTOR
METHOD Init() INLINE ::New()
METHOD DestroyFR() INLINE ::End()
METHOD SetWorkArea( cAlias, nArea, lOem, aRangeParams )
....
END CLASS
(2)
:AddReport() --> Not supported
LoadFR3Report( oFrPrn, cRepName ) --> Unknown function, use property cFilename
:PreviewOptions:SetModal( .T. ) --> Ok.
:ShowReport()
:RemoveReport( nReport ) --> Not supported
:ClearDataSets() --> Not supported
Consult the function Sergey() on our sample FrConsole.prg
BTW, if you believe our FRX has to be 100000000% compatible with Sergey product, then yo have made a wrong decision buying our software. Please contact with sales@xailer.com before 15 days after purchase if you want a refund.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
reinaldocrespo
Mensajes: 11
Registrado: Mar Oct 29, 2013 1:49 am

Transition from Sergeys FR

Mensaje por reinaldocrespo »

Ignacio, I think your responses are too defensive. I'm not criticizing frx. I do not wish to have a 100000000000000% compatible product. To me, it doesn't even have to be compatible at all. Like I've said previously, I do not mind if I have to change my code in order to use frx. I just don't know exactly how. I rather have a continuation to fr than nothing at all and I hope this effort gets more support from the xbase community.
Again, and only at the risk of repeating myself too many times: **I will not mind if I have to change my code in order to use frx instead of frh I'm just a little uncertain as to how**
Thank you for your help.
Reinaldo.
Responder