Página 1 de 1

Transition from Sergeys FR

Publicado: Mié Nov 06, 2013 11:18 am
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

Transition from Sergeys FR

Publicado: Mié Nov 06, 2013 5:24 pm
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.

Transition from Sergeys FR

Publicado: Mié Nov 06, 2013 5:47 pm
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,

Transition from Sergeys FR

Publicado: Mié Nov 06, 2013 6:25 pm
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.