Save a Layout to a File
Description
The Save Layout to a File action allows you to print, preview, email, or save a layout in a variety of formats.
Discussion
The Save a Layout to a File script can be used to save a Layout (Report, Label, Letter, Form, or Browse) as a file with a PDF, HTML, Rich Text, or plaintext format.
Procedure
On the Settings tab make a selection from the Select Layout Type list. The options are:
- Report
- Label
- Letter
- Form
- Browse
Optionally, if the action is running from a button on a layout, check Only show Layouts for current Table/Set to filter the contents of the Layout Name list.
Optionally, check Display 'Print/Preview' prompt at runtime? check box if you would like the user to be able to choose between previewing and printing the layout. This option displays the Print Method dialog box.
Select a layout from the Layout Name list.
If you select "<Prompt at Runtime>" from the Layout Name list, make a selection from the "When prompting, show layouts from" list. The options are:
- Another Table/Set
- Current Table/Set
If you selected "Another Table/Set", select a table or set from the Select Table/Set Name list.
Click the Options tab.
To save a layout to a file, the Save as a file option should be selected. This option will already be selected if the Action Script chosen from the "Select Action" window was Save a Layout to a File. If "Save as a file" is not selected, select it from the list of options.
The Save a Layout to a File action can be changed to Archive a Layout, Send a Layout via E-mail, Preview a Layout, or Print a Layout by changing the selected option in the Print Method dropdown box.
Configuring the File
Make a selection from the File Format list. The options are:
- Format
- Description
- Adobe Acrobat PDF File
Can be displayed with Adobe Acrobat Reader.
- Dynamic HTML File
Can be displayed with a browser.
- Rich Text Format File
Can be displayed with Microsoft Word or Microsoft Wordpad.
- Plain Text File
Can be displayed with Microsoft Notepad and many other text editors.
Optionally select Override defaults for Save options and click Options to display the Print Options Dialog.
Optionally, enter a name into the Filename field. If you leave the filename blank, Alpha Anywhere will create a file with the same name as the layout in the same folder as the current database.
Optionally, check the Open file with associated application? check box. This specifies whether Alpha Anywhere should open the file with its associated application once it is created.
Finishing Script Configuration
Click Next >.
Optionally, define record selection criteria.
Click Next >.
Optionally modify the comment that describes the action.
Click Finish.
See Also