PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: HendersonS on December 05, 2025, 12:43:47 PM

Title: Working with External objects
Post by: HendersonS on December 05, 2025, 12:43:47 PM
Hi everyone. Lately, we've been working with third-party objects to interact with xmlsig, CR reports, etc., and we're having the same problem when passing a value to a method that requires another object as its constructor, or when passing a boolean value to the method. Does anyone know how we should handle these kinds of interactions? Thanks in advance.

Example with cr reports:
!
 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 name

example with xmlsig:
DEF 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
Title: Re: Working with External objects
Post by: James Zukowski on December 05, 2025, 01:25:18 PM
Have you tried passing "true" or "false" instead of 1 or 0?
Title: Re: Working with External objects
Post by: HendersonS on December 05, 2025, 01:43:29 PM
hi james, yes, we have tried with: true,false,"true","false",$00$,-1,0, and in all cases we get the same error.
Title: Re: Working with External objects
Post by: Devon Austen on December 05, 2025, 04:42:21 PM
Check the properties and methods available to pxplus by doing a

print EXP'*
or
print SIG'*

You can verify that Export() and SETX509CERT() are methods.

Other things to debug is check msg(-1) after you get the error for any more detailed error info. You could also checked

print EXP'PvxError$ for the same.