jcoffey Posted February 22, 2008 Share Posted February 22, 2008 All, Does anyone have any ideas on how to create a snap-shot of an invoice so I would have a duplicate of an invoice printed for a client without actually having to print and store a copy of the invoice. Ideally, an image file would be created at the same time as the printing that would be saved on the hard-drive automatically. I've also thought about using lookups for this but I would have to create a new table where all fields are lookups. Yes? This may be a possibility. John Coffey Quote Link to comment Share on other sites More sharing options...
Maarten Witberg Posted February 22, 2008 Share Posted February 22, 2008 create a pdf after printing? Quote Link to comment Share on other sites More sharing options...
jcoffey Posted February 22, 2008 Author Share Posted February 22, 2008 Kjoe, Thanks for the reply. After I posted I began to look into the possibility of making a pdf. I made a script that created a pdf of the current record, which it did very well. However I had to entitle the file. The next time I ran the script with a new record, it overwrote the file, loosing the first pdf. I think you're on the right track though. What do you think about a separate table with lookups for all the fields? John Coffey Quote Link to comment Share on other sites More sharing options...
LingoJango Posted February 22, 2008 Share Posted February 22, 2008 Use a variable to name the pdf, use the invoice number (oughta be unique!) as part of the invoice filename. Quote Link to comment Share on other sites More sharing options...
jcoffey Posted February 23, 2008 Author Share Posted February 23, 2008 Lingo, Nice to hear from you again! I'm trying to duplicate printed invoices so I have an exact copy of what I've handed my client, because, as my db evolves, the layouts will change. Also my solution has fields that change on all invoices from the same client, past and present, as they include an always changing account balance. So, I'd like to save as pdf but I don't see how I can use a variable to name the pdf file. Could you be more specific? How would I do that? John Coffey Quote Link to comment Share on other sites More sharing options...
LingoJango Posted February 23, 2008 Share Posted February 23, 2008 Hi John, this is (approximately) my Set Variable calc. //folder path "filewin:/D:/MyDocs/Invoices/" & //Invoice number e.g. 2007/555 "F" & Substitute ( Invoices::InvoiceNumber ; "/" ; "-" ) & // the "Substitute" part is because I use a forward slash in my invoice numbering and it's not allowed in Windows file names //Client name - only letters and digits because I don't like spaces in file names Filter (Clients::Nom empresa ; "ABCÇDEFGHIJKLMNÑOPQRSTUVWXYZabcçdefghijklmnñopqrstuvwxyz0123456789" ) //pdf extension & ".pdf" And my "print invoice script basically runs Go to layout [invoicePrintLayout] Print Setup [Restore, No Dialog] #this makes sure I use portrait rather than landscape Set Variable [$InvoiceFilePath ; the calc I gave you] Save Records As PDF [Restore ; $InvoiceFilePath ; Automatically open ; Current record ] Go to Layout [original layout] I actually added some embellishments such as asking "Do you really want to print" and checking that the app version is higher than 8 cause I still occasionally need to open my accounting database in a hurry when I have 7 open, but that's unnecessary. You wouldn't need to have the pdf open automatically but it's a way of making sure the print-to-pdf step has occurred. What I do is actually print the invoice to paper from the pdf file. Unfortunately I still haven't managed to fix a problem with graphics: when I print to PDF using PrimoPDF I get excellent graphics, but when I do it from the FileMaker script this way, my lovely logo somehow gets hopelessly garbled. But that's a different matter and needn't affect you. Quote Link to comment Share on other sites More sharing options...
LingoJango Posted February 23, 2008 Share Posted February 23, 2008 You're on a mac so you need to use a different calc for the path - I'll let you work it out. smiley-smile Quote Link to comment Share on other sites More sharing options...
LingoJango Posted February 23, 2008 Share Posted February 23, 2008 Also, Clients::Nom empresa is the client name field, but when I redo this database from scratch sometime this summer I will never ever ever again use field names with spaces in them. Quote Link to comment Share on other sites More sharing options...
jcoffey Posted February 29, 2008 Author Share Posted February 29, 2008 Lingo, kjoe, With your help and a little research, the pdf "snap-shot" of a printed invoice works - once I understood how the Set Variable worked! That was key. I incorporated this into my printing script so it happens automatically with a file titled "invoice#lastname" appearing in a folder just for these files. Not only will I have a record of what I handed my client last week or last month regardless of changes to my database, I have copies should my db go south (perish the thought!) or if programs become mothballed. Onto my next challenge which I've posted in another category. Thanks, again, for all your help. jcoffey Quote Link to comment Share on other sites More sharing options...
touchMe Posted February 29, 2008 Share Posted February 29, 2008 you would also satisfy a tax audit-trail smiley-smile Quote Link to comment Share on other sites More sharing options...
jcoffey Posted February 29, 2008 Author Share Posted February 29, 2008 Legal issues were foremost on my mind in greating a duplicate copy. I had been on a jury where the validation of documents and their copies was often at issue. What an eye-opener! John Coffey Quote Link to comment Share on other sites More sharing options...
touchMe Posted March 1, 2008 Share Posted March 1, 2008 That's interesting John... actually legal and financial compliance can only be as good as the 'expert'; never met a lawyer yet skillful enough to successfully argue 'legitimacy' for an electronic date/time stamped document (when disputed), they might argue 'due-dilligence', but then... there's always someone who might wish to contest Wait until you need HIPAA or ISO9000 compliance, now we're talking! ha! We produce our 'invoices' as date(created) etc., PDFs, but 'the issuer' still physically signs an original paper file-copy... save the trees, huh?! It might make for an interesting discussion on these forums Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.