Reid Posted February 18, 2011 Share Posted February 18, 2011 Is it possible to export to PDF and name the file based on a field name? I have a daily report that I want to save as a PDF with a name "PDF Export For (table::DateField)". Link to comment Share on other sites More sharing options...
VincentO'B Posted February 18, 2011 Share Posted February 18, 2011 Reid 1. Make a calc field = "PDF Export For" & Get ( CurrentDate ) 2. In the 'Save records as PDF' script step. Under the 'Specify output file' option you can name the file with your calc field and save it to a location of your choosing. Vincent Link to comment Share on other sites More sharing options...
Reid Posted February 18, 2011 Author Share Posted February 18, 2011 Reid 1. Make a calc field = "PDF Export For" & Get ( CurrentDate ) 2. In the 'Save records as PDF' script step. Under the 'Specify output file' option you can name the file and save it to a location of your choosing Vincent How do I name the file using the calc field I just created? All I see is "Output File Path List" and then pick a filename. Link to comment Share on other sites More sharing options...
comment Posted February 18, 2011 Share Posted February 18, 2011 Use a script variable, e.g.: Set Variable [ $myPath; Value:Get (DesktopPath) & "/" & MyTable::MyField & ".pdf" ] Save Records as PDF [ File Name: “$myPath”; Records being browsed ] No calculation field is required. Link to comment Share on other sites More sharing options...
Reid Posted February 18, 2011 Author Share Posted February 18, 2011 Use a script variable, e.g.: Set Variable [ $myPath; Value:Get (DesktopPath) & "/" & MyTable::MyField & ".pdf" ] Save Records as PDF [ File Name: “$myPath”; Records being browsed ] It says it is an invalid Get Function. This is what I put in for the $myPath variable Get (filewin:/C:/Folder/Folder/Folder) &"/" & MFSDItems::SavePDFfileTitle &".pdf" Link to comment Share on other sites More sharing options...
comment Posted February 18, 2011 Share Posted February 18, 2011 Get (DesktopPath) is a valid function. If you want another location, try: "filewin:/C:/Folder/Folder/Folder/" & MFSDItems::SavePDFfileTitle & ".pdf" Link to comment Share on other sites More sharing options...
Reid Posted February 18, 2011 Author Share Posted February 18, 2011 Get (DesktopPath) is a valid function. If you want another location, try: "filewin:/C:/Folder/Folder/Folder/" & MFSDItems::SavePDFfileTitle & ".pdf" Thanks...this works but now the PDF can't be created because my field MFSDItems::SavePDFfileTitle has a date in it (i.e. 2/17/2011) I'm trying to create a calculation field that equals my date field with the intention to change the format. Is there a way to change the "/" to "-"? A calculation like MFSDItems:date FormatChange(**-**-****) Link to comment Share on other sites More sharing options...
comment Posted February 18, 2011 Share Posted February 18, 2011 Try the Substitute() function. Or extract the date elements using Year(), Month() and Day() functions - this will enable you to rebuild the format to say yyyy-mm-dd, so that the files can be sorted properly. Link to comment Share on other sites More sharing options...
bruceR Posted February 18, 2011 Share Posted February 18, 2011 Use a script variable, e.g.: Set Variable [ $myPath; Value:Get (DesktopPath) & "/" & MyTable::MyField & ".pdf" ] Save Records as PDF [ File Name: “$myPath”; Records being browsed ] No calculation field is required. The slash is not required; it is part of get( desktopPath). Set Variable [ $myPath; Value:Get (DesktopPath) & MyTable::MyField & ".pdf" ] Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 4809 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