Plucky Posted April 13, 2008 Posted April 13, 2008 Hi I need to be able to run a script that can search for a representatives work that is still unpaid and then sort these records by customer. This then needs to export pdf's showing individual customers outstanding work that I can email out to each customer. I have a script that can find all the work but it does not separate the PDF's into individual customers. Any Ideas
Don_Macaroni Posted April 13, 2008 Posted April 13, 2008 Make a script with a LOOP. In each occurance within the loop you do a 'Create PDF'. Set the 'Create PDF' to have a fixed location and create a dynamically set name for each PDF.
Plucky Posted April 14, 2008 Author Posted April 14, 2008 Hi Don Thanks for that, but I have a couple of questions. How do I get FM to save a PDF for each customer and how do I create a dynamically set name. Do you have any sample files how this could work. Plucky
Don_Macaroni Posted April 15, 2008 Posted April 15, 2008 Let me make one for you... Will upload asap.
Don_Macaroni Posted April 15, 2008 Posted April 15, 2008 Here you go... Script with a loop statement. Will create individual PDF files for each company that has invoices marked "NOT PAID". PDF files are simply named a number (starting with 1, going up). You can make this the company name also, but that takes a little more effort... Let me know. loop.fp7.zip
Plucky Posted April 15, 2008 Author Posted April 15, 2008 Hi Dom That's exactly what I needed, Thanks Is it complicated to have the customers name appear as the title of each PDF. Plucky
Don_Macaroni Posted April 15, 2008 Posted April 15, 2008 I thought it wasn't, but it apparently is. Not impossible of coarse. I made a variable ' $file_name ' which was ' customer::customer_name & ".pdf" '. This worked only in part, as all files were named like the first record. I did not further inspect why this was, I will look into this later.
Don_Macaroni Posted April 15, 2008 Posted April 15, 2008 Got it, really nice ;-). PDF file names auto generated from the customer name. File attached. Let me know. loop.fp7.zip
Plucky Posted April 15, 2008 Author Posted April 15, 2008 Hi Don Excellent.. That's just what I wanted. You have no idea how long I have been racking my brain to solve this. Thanks again. Plucky
Recommended Posts
This topic is 6067 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