Mazkot Posted September 19, 2013 Posted September 19, 2013 Is it possible to append a pdf with two different page setups? Here's my scenario: I have two different callreports a sales rep can do. A one page("CallReport 1 page Print" and a two page "CallReport Print"). I'd like a script to combine these reports when necessary so that our customer only receives one attachment with both reports. Here is my script: Set Error Capture [On] Perform Find [Restore] (this step looks for all reports marked to print) If [Get (LastError) = 0] Set Variable [$Filename; Value:"Service_Call_Report_" & Substitute ( Get ( CurrentDate ) ; "/" ; "-" ) & ".pdf"] Set Variable [$PDFPath; Value:Get (DocumentsPath) & $FileName] Constrain Found Set [Restore] (Finds records which need the two page report) Go to Layout ["CallReport Print"(CallReport)] Print Setup [Restore] (This report is landscape) Save Records as PDF[Restore; No dialog; "$FileName"; Records being browsed] Extend Found Set [Restore] (to add back into found set the records which need only one page format) Constrain Found Set [Restore] (Finds records which need the one page report) Go to Layout ["CallReport 1 page Print"(CallReport)] Print Setup [Restore] (This report is portrait) Save Records as PDF[Restore; Append; No dialog; "$FileName"; Records being browsed] Send Mail [send via E-mail Client; To: Signature::email; Subject: "Service Call Reports";"$PDFPath" Else Show Custom Dialog ["No Records Found"; "No reports have been selected"] End If At this point if there is one 1page report and 1 two page call report ...only the one page call report is being emailed. It appears as though it is originally making the two page report but then it must be being overwritten. Any ideas? Thanks Mark
eos Posted September 19, 2013 Posted September 19, 2013 The procedure works (at least under Mac OS X): TestAt_2013_09_19 5_22_42 PM.pdf The problem is that you're using different $s for creating/appending the PDF and for specifying the attachment. Use $PDFPath for all steps.
Mazkot Posted September 19, 2013 Author Posted September 19, 2013 Yes...I was just coming back to the forum to post that I found that in the save records as lines I needed the $PDFPath. This works in windows but when I try in FM Go on an Ipad it is still overwriting the pdf instead of appending it.
Mazkot Posted September 19, 2013 Author Posted September 19, 2013 Found my answer to the last question...It's a big fat NO...
bcooney Posted September 19, 2013 Posted September 19, 2013 Append to PDF is NOT supported on iOS. Argh, I know. Can you possible make this one big layout? Perhaps with a reporting table or (she hates to say bcs I don't usually suggest including portals on a report), portals?
Recommended Posts
This topic is 4082 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now