The 2 problems I have occur at random
Error #1.) Our site will have issues either displaying or emailing PDF documents from a report. You can click the button/link a dozen times --- sometimes the PDF is emailed/displayed, sometimes it doesn’t. There are no errors with the code when I debug it. I have some loops which run daily which send a current statement to the clients --- some of the emails go out with the PDFs attached, some do not at random. Sometimes I can send reports for three days without any issue, the next day 20% could be missing the PDF attachment. It is always random when it occurs and it occurs across our site, regardless of what page, grid, UX, or while loop routine etc that you are attempting to run. It does seem to happen more with IE than Chrome or FireFox but most of our clients use IE so it is not an option to simply mandate Chrome be used.
Error #2.) I do notice that on IE we also have many issues where a random page simply will error on loading. If you F5 to refresh, the page loads fine. This doesn’t seem to happen "as much" with Chrome or FireFox but again, most of our clients use IE and it does occur sometimes on Chrome and FireFox.
- I have ruled out an Alpha software installation issue – we have recently been moved to a new server by Zebrahost with a fresh install. Both issues still persist.
- We use A5V12 – 12.3 Build 2689 – 4440 --- unfortunately we are not a developer so we cannot afford/substantiate the cost to install the newest version of software. With each new version it seems we are required to rewrite a lot of our current code to make it compatible and this is not possible either for $ and time constraints since I personally wear all “hats” of the business – IT, CEO, sales, marketing, customer service etc.
Some sample code showing how we setup the PDFs to either be displayed or emailed are shown below. I am not sure if the PDF display/creation is related to the random page load error or not… the only thing is that each of these happen at random anywhere on the site and will not occur the next time you try to load the page or view/email the PDF. Maybe there is a setting on the A5 Server is wrong? Here is how ours is setup:
image1.pngimage2.png
EXAMPLE TO SEND PDF AS ATTACHMENT IN EMAIL
EXAMPLE TO DISPLAY PDF ON SCREEN
Thank you for any guidance you can give --- this has been going on for years and I cannot continue like this offering a website to my clients which the pages and PDFs do not load 100% of the time.
Error #1.) Our site will have issues either displaying or emailing PDF documents from a report. You can click the button/link a dozen times --- sometimes the PDF is emailed/displayed, sometimes it doesn’t. There are no errors with the code when I debug it. I have some loops which run daily which send a current statement to the clients --- some of the emails go out with the PDFs attached, some do not at random. Sometimes I can send reports for three days without any issue, the next day 20% could be missing the PDF attachment. It is always random when it occurs and it occurs across our site, regardless of what page, grid, UX, or while loop routine etc that you are attempting to run. It does seem to happen more with IE than Chrome or FireFox but most of our clients use IE so it is not an option to simply mandate Chrome be used.
Error #2.) I do notice that on IE we also have many issues where a random page simply will error on loading. If you F5 to refresh, the page loads fine. This doesn’t seem to happen "as much" with Chrome or FireFox but again, most of our clients use IE and it does occur sometimes on Chrome and FireFox.
- I have ruled out an Alpha software installation issue – we have recently been moved to a new server by Zebrahost with a fresh install. Both issues still persist.
- We use A5V12 – 12.3 Build 2689 – 4440 --- unfortunately we are not a developer so we cannot afford/substantiate the cost to install the newest version of software. With each new version it seems we are required to rewrite a lot of our current code to make it compatible and this is not possible either for $ and time constraints since I personally wear all “hats” of the business – IT, CEO, sales, marketing, customer service etc.
Some sample code showing how we setup the PDFs to either be displayed or emailed are shown below. I am not sure if the PDF display/creation is related to the random page load error or not… the only thing is that each of these happen at random anywhere on the site and will not occur the next time you try to load the page or view/email the PDF. Maybe there is a setting on the A5 Server is wrong? Here is how ours is setup:
image1.pngimage2.png
EXAMPLE TO SEND PDF AS ATTACHMENT IN EMAIL
Code:
dim pSet as p pSet.LinearizeForWeb=.T. pSet.CanModifyDocument=.F. pSet.JpegQuality="NoCompression" filename = Request.GetRequestTempFileName() filename = report.saveas("CC_Receipt@[PathAlias.ADB_Path]\cc_receipts_report.set","pdf",filter,order,filename,.f.,pSet) Session.SaveDataAsFile("Receipt.pdf",file.to_blob(filename)) message.attachments = filename
EXAMPLE TO DISPLAY PDF ON SCREEN
Code:
dim pSet as p pSet.LinearizeForWeb=.T. pSet.CanModifyDocument=.F. pSet.JpegQuality="NoCompression" filename = Request.GetRequestTempFileName() filename2 = Request.GetRequestTempFileName() filename3 = Request.GetRequestTempFileName() filename = report.saveas("PFC_SC@[PathAlias.ADB_Path]\finance_agreement.set","pdf",filter,order,filename,.f.,pSet) filename2 = report.saveas("PFC_Instructions_NON_WC@[PathAlias.ADB_Path]\Finance_Agreement.set","pdf",filter,order,filename2,.f.,pSet) filename3 = report.saveas("PFC_PaymentForm@[PathAlias.ADB_Path]\Finance_Agreement.set","pdf",filter,order,filename3,.f.,pSet) pdf_append(filename2,filename3) pdf_append(filename2,filename) Session.SaveDataAsFile("Finance_Agreement.PDF",file.to_blob(filename2)) response.redirect(Session.FormatFileDataURL("Finance_Agreement.PDF?") + time("hms3"))
Thank you for any guidance you can give --- this has been going on for years and I cannot continue like this offering a website to my clients which the pages and PDFs do not load 100% of the time.
Comment