AnsweredAssumed Answered

Creating Multi Record pdf Not working

Question asked by CraigFiore on Mar 14, 2014


Creating Multi Record pdf Not working


     Hello everyone,

     I am having a problem creating pdf and sending them as emails with multi record files.

     Here is more detail:

     I have a layout called Estimates. In this layout I have a portal to another data base called "Scope". This way and estimate can have as many scopes as needed. 

     I have a layout called Estimate Print. This layout has all the general info for the estimate plus the scopes. After I sort this layout it prints perfect.

     My issue:

     I created a script that will save Estimate Print layout to a pdf and attach it to an email. It use to work great, but now, if I have more than one scope I get error message from Adobe Reader. (see attached) The preview looks fine but when you open it the error pops up and I can only see the first Scope. Now this only happens to users that are using Adobe Reader. My system has Adobe Acrobat Pro. This does not seem to happen. 

     Here is my Script:

Set Variable [ $EstimateID; Value:Estimate::Estimate Number ]

Go to Layout [ “Estimate Print” (Scope Data) ]

Perform Find [ Specified Find Requests: Find Records; Criteria: Scope Data::Scope ID: “$EstimateID” ] [ Restore ]

Sort Records [ Keep records in sorted order; Specified Sort Order: Scope Data::Scope ID; ascending Scope Data::Section; ascending ][ Restore; No dialog ]

Print Setup [ Orientation: Portrait; Paper size: 8.5" x 11" ] [ Restore; No dialog ]

Set Variable [ $CelosealEstimate; Value:"filemac:" & Get ( TemporaryPath ) & Estimate::Property Name&" "&Estimate::Estimate Change Order&" "&Estimate::Estimate Number&" "&Month ( Estimate::Estimate Date )&"-"&Day ( Estimate::Estimate Date ) &"-"&Year ( Estimate::Estimate Date )&".pdf" ]

Save Records as PDF [ File Name: “$CelosealEstimate”; Records being browsed ]

Send Mail [ Send via E-mail Client; To: Estimate::Property Email; CC: Estimate::Job Contact email; Subject: Estimate::Property Name&"-"&Estimate::Description of Work&"-"&Estimate::Area of Work&"-"&Estimate::Location&"-Celoseal Roofing"; Message: "Attached is a copy of the estimate you requested.¶¶"; Attachment: “$CelosealEstimate” ]

Go to Layout [ original layout ]

     Thank you,