Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - HendersonS

#1
Programming / Re: Working with External objects
December 10, 2025, 01:47:04 PM
James, I tried it with numerical values, but it still doesn't work.

Mike, I tried passing the object from exportOptions and it's still not working. I think your example uses a different version of Crystal Reports; we're using 8.5. As mentioned before, we used the same logic in PowerShell and it works fine, so we think it should work in pxplus.

PowerShell code Works:
$app = New-Object -ComObject CrystalRuntime.Application
$report = $app.OpenReport("C:\temp\customers.rpt")
$report.EnableParameterPrompting = $false
$report.DisplayProgressDialog = $false
$report.DiscardSavedData() | Out-Null
$exportOpts = $report.ExportOptions
$exportOpts.DestinationType = 1
$exportOpts.FormatType = 31
$exportOpts.DiskFileName = "C:\temp\customers.pdf"
$exportOpts.PDFExportAllPages = $true
$report.Export($false)

Pxplus code Fails:
DEF OBJECT CR_APP,"CrystalRuntime.Application"
 LET REPORT=CR_APP'OPENREPORT("C:\temp\customers.rpt")
 LET REPORT'ENABLEPARAMETERPROMPTING=0
 LET REPORT'DISPLAYPROGRESSDIALOG=0
 LET DS=REPORT'DISCARDSAVEDDATA()
 LET EXPORTOPTS=REPORT'EXPORTOPTIONS ! Opts Object EXPORTOPTS
 LET EXPORTOPTS'DESTINATIONTYPE=1
 LET EXPORTOPTS'FORMATTYPE=31 ! pdf
 LET EXPORTOPTS'PDFEXPORTALLPAGES=-1
 LET EXPORTOPTS'DISKFILENAME$="C:\temp\customers.pdf"
 REPORT'EXPORT(0)
#2
Programming / Re: Working with External objects
December 10, 2025, 12:06:23 PM
Mike, I tried doing it as you instructed, but I'm still getting the same error.

DEF OBJECT v,"*VARIANT"
v'val$="false"
v'type$="B"
PRINT v'val$
0
report'export(*v)
report'export(v) !also try this
Error #88: Invalid/unknown property name
Exception occurred (err/ret=2/0)

#3
Programming / Re: Working with External objects
December 09, 2025, 12:41:08 PM
Mike, thanks for your reply. Could you give me an example of how to pass a boolean value false because my attempts are receiving the same error?

We try:
DEF OBJECT V,"*VARIANT"
LET V'TYPE$="B"
LET V'VAL$="0"
! LET V'VAL$="FALSE" !ALSO TRY THIS
REPORT'EXPORT(*V)
!REPORT'EXPORT(V) ! also try this
#4
Programming / Re: Working with External objects
December 09, 2025, 10:44:29 AM
Devon, According to the documentation, I should send true or false. I even tested it with PowerShell and VB.NET, and it works by sending the parameter false, so the problem seems to be in how PXPlus sends the value to the method.
#5
Programming / Re: Working with External objects
December 08, 2025, 08:42:03 AM
Hi Koe, thanks for your help. Adding * to the constructor worked correctly.



Devon,about the other issue, i can confirm that this method exists. In fact, if we try it without arguments like report'export(), it works, but it displays a dialog box, and we don't want that, I have attached an image of what msg(-1) tells me, but it doesn't give me any indication of how to fix it or what might be causing the exception.
#6
Programming / Re: Working with External objects
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.
#7
Programming / Working with External objects
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
#8
Web Services / Re: Unexpected Response in an HTTP Request
September 19, 2025, 04:41:59 PM
James we have checked it and we have not found any difference in the body, it even has exactly the same length except for the Boundary.
#9
Web Services / Re: Unexpected Response in an HTTP Request
September 19, 2025, 03:01:28 PM
Hi Devon, sorry for the delay in responding. We're trying to resolve this issue. We use byte counting, and the difference between the content length in Postman and pxplus is the Boundary length. Technically, this shouldn't affect the HTTP request, so we don't believe it's the issue. We're still trying to determine what the problem is. What do you suggest?
#10
Web Services / Re: Unexpected Response in an HTTP Request
September 09, 2025, 01:55:33 PM
Devon, we used the CALL "*tools/readfile",path$,xml_str$ tool to read the file, so I believe the length is correct.
#11
Web Services / Re: Unexpected Response in an HTTP Request
September 05, 2025, 09:54:10 PM
devon we saw those small differences but technically this should not have a negative impact on the http request, however we have made the changes so that it is exactly like in postman, except for the postman-token, the cookie and the content-length, which according to pxplus that would be the correct size (5506), I don't know why in postman it is a little smaller (5500), we are using pxplus 2025, but we have tried with several versions and we have the same results, the truth is we are running out of ideas, maybe we have to use powershell or c# to make the http request
#12
Web Services / Re: Unexpected Response in an HTTP Request
September 05, 2025, 01:53:27 PM
Thanks Devon for your reply, we tried that change but we have the same results, any other ideas?
#13
Web Services / Re: Unexpected Response in an HTTP Request
September 04, 2025, 08:51:48 PM
Thanks Loren for your reply. We saw that small difference and made the change, but we had the same results. We think it must be something with the headers, but we can't figure out what the error is.
#14
Web Services / Unexpected Response in an HTTP Request
September 04, 2025, 05:09:59 PM
Hello everyone, we are working with a third party API that we send xml files, and we are getting an unexpected response when we tried to post a file using the pxplus *plus/web/request utility, but when we use postman we get the expected response, we compare the raw http post, and initially we don't find any relevant differences.

this example of what we send from pxplus:
POST https://web.com/endpoint HTTP/1.1
Content-Type: multipart/form-data; boundary=----PxPlusFormDataBoundary_jqePihSICwS9OCggqvv6pcSWx53Sr4PI
Content-Length: 5506
User-Agent: CustomApp/3.5.1
accept-encoding: gzip, deflate, br
Accept: application/json
Authorization: bearer yJhbGciOiJIUzIfQ.VDMfa9MhV...
Host: web.com
Cache-Control: no-cache

------PxPlusFormDataBoundary_jqePihSICwS9OCggqvv6pcSWx53Sr4PI
Content-Disposition: form-data; name="xml"; filename="file_name.xml"
Content-Type: text/xml

<?xml version="1.0" encoding="utf-8"?>
<XMLCONTENT>
...HH
</XMLCONTENT>

------PxPlusFormDataBoundary_jqePihSICwS9OCggqvv6pcSWx53Sr4PI--

and this is the response:
HTTP/1.0 400 Bad Request
Content-Type: text/html

<html><head><title>Error</title></head><body>
<h2>ERROR: </h2>
<br>
</body></html>



this example from Postman:
POST https://web.com/endpoint HTTP/1.1
Authorization: Bearer yJhbGciOiJIUzIfQ.VDMfa9MhV...
User-Agent: PostmanRuntime/7.39.1
Accept: */*
Cache-Control: no-cache
Postman-Token: 84e36083-e8d2-45c0-a796-8ceba.......
Host: web.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: multipart/form-data; boundary=--------------------------016854827228628556451404
Cookie: citrix_ns_id=AAI7XMG5aDvuodAGAAAAADtph5H_folAahaJO3ZgXF47eTRF6UPCLl86FZ_BO32DOw==Wci5aA==DQb-sHYMQEWeET5gyA37CgIG7zs=
Content-Length: 5500

----------------------------016854827228628556451404
Content-Disposition: form-data; name="xml"; filename="file_name.xml"
Content-Type: application/xml

<?xml version="1.0" encoding="utf-8"?>
<XMLCONTENT>
...HH
</XMLCONTENT>

----------------------------016854827228628556451404--

and the response is the expected json.

so What could be causing us not to have the same response in pxplus?

thanks in advance,
HendersonS.

#15
Hi Kevin, thank you very much. I see this is a great piece of work. I think it will be very useful. I'll try this repository and let you know what we think.