Jump to content

Save Records as PDF

Recommended Posts

  • Newbies

I'm trying to write a script to generate invoices for a group of players by team, save to PDF and eventually email the PDF out. Problem is when I select a particular team, each saved pdf has multiple players' invoices instead of the just one filename = one player. Strange part is the saved pdf for each is different i.e. one file might have 8 different pages (8 different players) while another might have 10. Again, just looking for one filename (dynamic to pull player name) to equal one player, not multiple. Here's the script...Please help!

Go to Layout [“Invoice PDFs” (Billing)]

Print Setup [Restore; With dialog: Off]

Enter Find Mode [Pause: Off]

Perform Find [ ]

Sort Records [Restore ; With dialog: Off]


            Set Variable [$Filepath ; Value: Get(DesktopPath) & Player_Person::Player_FullName & “.pdf”]

            Save Records to PDF [Restore ; With dialog: Off ; “$FilePath” ; Records being browsed]

            Set Variable [$PlayerIDTEST]

            Set Variable [$BillingIDTEST]


                        Omit Record

                        Exit Loop If [Player_Person::Player_ID =$PlayerIDTEST and Billing::Billing_ID = $BillingIDTEST]

            End Loop

            Exit Loop If [Get(FoundCount)=0]

End Loop


Link to post
Share on other sites

I suspect that the problem is with the 'Records being browsed' option being checked for the Save Records to PDF step.

What exactly is a record in the Billing table and how many of them make up an invoice?

P.S. Please update your profile  to reflect your version  and OS, so that we know what you can use


Edited by comment
Link to post
Share on other sites

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.