Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4082 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

  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

Posted

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.

Posted

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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.