Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EReports error -121 in Win10
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
EReports error -121 in Win10
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 10
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01644991
Message ID:
01644991
Views:
56
Below is some code we have used without problem for years through Win7. It creates a PDF using eReports, saves it to a temporary file and, if successful (if lnResult=0), creates the Outlook email.

Suddenly, on Win10 boxes, it is returning lnResult="-121"

I can't figure out what the error means - any ideas? Thanks!

****UPDATE - the perplexing part is that the PDF is actually created and in the temp folder, yet the value of lnResult is not zero****
CASE nBarNum=7 &&Email
	l_coldpath=SYS(5)+SYS(2003)
	SET PATH TO c:\qdms2004
	LOCAL lnResult, oPDF
	p_recnum=STR(RECNO("cofc"))
	l_attachment='c:\windows\temp\qdms\cert.pdf'
	l_stdtext="Attached is Certificate of Compliance No. ";
		+THISFORM.Qdmsbasepgf1.Page1.txtCertnum.VALUE +" for ";
		+ALLTRIM(THISFORM.Qdmsbasepgf1.Page1.txtMatl.VALUE);
		+" as you requested."+CHR(13)+" "+CHR(13);
		+"If you have any further questions, please contact XXXXXXX"

	oPDF = NEWOBJECT ("eReportsPDF", "eReports.dll", "eReports.dll")
	oPDF.UNLOCK("xxxxxxx xxxxxx - XXXXXXX XXXXXX XXXXX XXXXX")
	oPDF.EmbedFonts = 0
	oPDF.JPGQUality=5
	oPDF.ReportFile = "qcf75.frx"
	oPDF.OutPutFile = "C:\Windows\Temp\qdms\Cert.Pdf"
	oPDF.ReportExpr = "RECORD "+p_recnum
	lnResult = oPDF.ReportConvert()
	SET PATH TO TO l_coldpath

	*If the PDF was created, prepare the email in Notes
	IF lnResult=0
Phil Thomas
http://phillipdthomas.com

Never let your energy or enthusiasm be dampened by the discouragements that must inevitably come.....
Next
Reply
Map
View

Click here to load this message in the networking platform