FilePrint @Command (Formula Language)

Prints the currently open or selected document(s), or the current view.

Syntax

@Command( [FilePrint] )

or

@Command( [FilePrint] ; numCopies ; fromPage ; toPage ; ifDraft ; ifView ; formName ; breakType ; ifReset; startDate; endDate )

Parameters

numCopies

Text. Optional. The string must evaluate to a number, or be empty. The number of copies you want to print. Specify an empty string ("") for one copy.

fromPage

Text. Optional. The string must evaluate to a number, or be empty. The page of a document where you want to start printing. Specify an empty string ("") if you want to print all pages.

toPage

Text. Optional. The string must evaluate to a number, or be empty. The page of a document where you want to stop printing. Specify an empty string ("") if you want to print all pages.

ifDraft

Text. Optional. Either the word "draft", to indicate that you want draft quality printing; or an empty string (""), if you want regular quality printing.

ifView

Text. Optional. Either the word "printview", to indicate that you want to print the current view; or an empty string (""), if you want to print the selected document(s) in a view, not the view itself. This parameter is ignored if you're printing from an open document.

formName

Text. Optional. The name of the form you want to use to print the document. Specify an empty string ("") if you want to print the document using its current form. This parameter is ignored if you're printing from an open document.

breakType

Text. Optional. Either the word "pagebreak", the word "line", or an empty string (""). If you're printing multiple documents from a view, "pagebreak"indicates you want a page break between each document, "line" indicates you want a ruled line between each document, and an empty string indicates you want a blank line between each document. This parameter is ignored if you're printing from an open document.

ifReset

Text. Optional. Either the word "resetpages", or an empty string (""). If you're printing multiple documents from a view, then "resetpages" specifies that page numbering begins at 1 with each new document; and an empty string ("") specifies that page numbering begins at 1 with the first document and continues cumulatively. This parameter is ignored if you're printing from an open document.

startDate

Time-date. Optional. Used with the printview parameter when printing a calendar view; indicates the first date to be printed. Specify an empty string ("") if you want to start printing with the earliest date in the view.

endDate

Time-date. Optional. Used with the printview parameter when printing a calendar view; indicates the last date to be printed. Specify an empty string ("") if you want to end printing with the last date in the view.

Usage

With no parameters, FilePrint displays the File Print dialog box (on the Macintosh, the chosen printer's dialog box). With parameters, FilePrint prints the current document(s) or view without displaying the dialog box.

In Notes® Release 3, FilePrint displays the File Print dialog box whether you use parameters or not.

This @command does not work on the Web. Use the browser's print button to print the current document or view. All hide-when formulas set for elements in the form or view are invoked by the browser.

Examples

  1. The following code, when added to an action button in a view, prints the entire view:
    @Command([FilePrint];"";"";"";"";"printview")
  2. This code, when added to an action button in a view, prompts users for the start and end dates of documents they want to print and then prints only documents with creation or modification dates within that specified range:
    @Command([EditSelectByDate]);
    @Command([FilePrint];"";"";"";"";"";"";"pagebreak")
  3. This code prints the selected documents from a view in landscape format. Add this code to an agent that has Action menu selection chosen as the trigger and None as the target.
    @Command([FilePrint])

    When the Print View dialog box displays, select landscape as the orientation on the Page Setup tab, then press Ok.