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