Working with External objects

Started by HendersonS, Today at 12:43:47 PM

Previous topic - Next topic

HendersonS

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

James Zukowski

Have you tried passing "true" or "false" instead of 1 or 0?
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

HendersonS

hi james, yes, we have tried with: true,false,"true","false",$00$,-1,0, and in all cases we get the same error.

Devon Austen

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.
Principal Software Engineer for PVX Plus Technologies LTD.