Official release of PxPlus 2025 Update 1 (version 22.10) NOW available for download.
!
DEF OBJECT CR_APP,"CrystalRuntime.Application"
LET REPORT=CR_APP'OPENREPORT("C:\temp\customers.rpt") ! // This opens the report and creates the 'Report' object
!
LET EXP=REPORT'EXPORTOPTIONS
LET EXP'DESTINATIONTYPE=1
LET EXP'FORMATTYPE=31 ! pdf
LET EXP'PDFEXPORTALLPAGES=-1
LET EXP'DISKFILENAME$="C:\temp\customers.pdf")
!CR Expects a boolean (true or false) !false no show dialog
REPORT'EXPORT(0) ! this give an error 88 Invalid/unknown property nameDEF OBJECT SIG,"Chilkat.XmlDSigGen.11" ! xmlsigner object
DEF OBJECT CERT,"Chilkat.Cert.11" ! cert object
LET CERT'LOADPFXFILE("C:\temp\cert.p12","pass")
LET C=CERT'LOADPFXFILE("C:\temp\cert.p12","pass") ! also we try this
LET SIG'SETX509CERT(CERT,1) ! this give an error 88 Invalid/unknown property name
LET SIG'SETX509CERT(C,1) !this give an error 88 Invalid/unknown property name ! also we try this def class "test"
!
! Method
!
function method$(a$)
enter a$
x$=_obj'subMethod$(a$,err=CascadeErr)
return x$
!
CascadeErr:
exit err
!
! Submethod
!
function subMethod$(a$)
enter a$
if a$="bad" \
then exit 11
return ucs(a$)
!
end defTest Program: oTest=new("test" for program)
set_param 'NE'=0 ! Default setting
gosub DoTest
!
set_param 'NE'=1
gosub DoTest
!
end
!
DoTest:
print "--------",'LF',"Test with 'NE'=",prm('NE')
!
print oTest'method$("good")
print otest'method$("bad",err=RptErr)
escape ! Should not get here
!
RptErr:
print "Error exit taken"
return ->run "test
--------
Test with 'NE'= 0
GOOD
Error exit taken
--------
Test with 'NE'= 1
GOOD
Error exit taken
->run "test
--------
Test with 'NE'= 0
GOOD
Error exit taken
--------
Test with 'NE'= 1
GOOD
0007 LET x$=_obj'subMethod$(a$) ! ,err=CascadeErr)
Error #11: Record not found or Duplicate key on write