1 .Choose View > Layout Mode (Control+L/Command+L).
2 .Choose Layouts > New Layout/Report (Control+N/Command+N). In the New Layout/Report dialog box, type a name for the layout. For this example, we'll use Date Find.
3 .
Choose "Blank layout" as the layout type and click Finish (Figure 9.1).
4 .Drag the Header and Footer parts up until they disappear, since we only need the Body part.
5 .Drag the Field tool into the layout. In the Specify Field dialog box that appears, choose your date field. Here, we add Sale Date (Figure 9.2).
6 .Using the Text tool, add directions on how to use the layout and arrange the text and field on the layout page (Figure 9.3).
Next we'll create the script to do the Find request and print the result.
7 .Choose Scripts > ScriptMaker (Control+Shift+S/Command+Shift+S). In the Define Scripts dialog box, click New. In the Edit Script dialog box, type a name for the script. (We use Print Sales Report.)
8 .In the step list on the left, double-click Go to Layout.
9 .Under Script Step Options, choose the layout you just created from the Specify drop-down menu (Figure 9.4).
10 .
In the Navigation section of the step list on the left, double-click Enter Find Mode. Leave the Pause box checked (Figure 9.5).
Since the user will choose different dates each time the script runs, you don't want to use the "Specify find requests" option. The Pause option makes the script wait for input before continuing.
11 .In the Found Sets section of the step list on the left, double-click Perform Find (Figure 9.6).
12 .If you want your report sorted a specific way, double-click Sort Records in the Found Sets section. Under Script Step Options, check the "Perform without dialog" check box.
13 .
Click the "Specify sort order" check box. When the Sort Records dialog box appears, double-click the field(s) to sort by in the list on the left (Figure 9.7). Drag them up or down to arrange them in the order of the sort, then click OK.
14 .
In the step list on the left, scroll up to the Navigation section and double-click Go to Layout.
15 .Under Script Step Options, choose the layout in which you want the found set to appear from the Specify drop-down menu (Figure 9.8).
16 .Scroll down to Files in the step list on the left, then double-click Print Setup. Check the "Perform without dialog" check box. Click the "Specify page setup" check box. When the Page Setup dialog box appears, choose the options to be used when printing the report (Figure 9.9). Click OK.
17 .In the step list on the left, double-click Print. If you want to see the Print dialog box, uncheck the "Perform without dialog" box. Click the "Specify print options" check box. In the Print dialog box, choose FileMaker in the drop-down menu. Set the Print option to "Records being browsed" (Figure 9.10). Click Print.
18 .In the Found Sets section of the step list, double-click Show All Records.
This will reset the database to All Records after you've finished printing the found set.
19 .In the Navigation section of the step list on the left, double-click Go to Layout. Leave the options as they are (Figure 9.11).
This step will return you to the layout from which the script was run.
20 .
Click OK twice to finish.