Chapter 11
(continued)
The askSam Report Writer
Designing A Report
When you design a report, there are several questions that must be answered. These include:
· Which Documents will supply the information in your report?
· Will the information be sorted and/or grouped?
· What information from the Documents will be used and how will this information be presented?
Selecting Documents To Include In A Report
When you create or edit a report, you can select which Documents are included in a report. The SELECT DOCUMENTS command in the REPORT menu offers the following options:
COMMAND DESCRIPTION
ALL All Documents are output in the report.
SEARCH Lets you select which Documents are output in the report by entering a search request.
STORED SEARCH Lets you select which Documents are output in a report by choosing a stored search request. The report uses this stored request to select the Documents.
Prompts allow users to modify the Documents that are selected each time a report is run. Each search type in the Search Dialog contains a prompt option. There is also a generic Prompt button in the Search Dialog when accessed from the Report Writer.
Defining a prompt is simple. You enter a text you want to appear when the report is run. You can also define a default value in case the user chooses OK without entering a prompt. Each time the report is run, a dialog box will appear containing the prompt and asking the user for input.
To Add a Prompt to a Request:
1. Choose TOOLS -> REPORT and create or edit a report.
2. Choose REPORT -> SELECT DOCUMENTS -> SEARCH
The Search Dialog Box will appear.
3. Choose a Search button (Word, Field, Date, Numeric, Proximity, or Prompt)
The Dialog Box for the search you chose will appear.
4. Choose the Prompt option.
The Prompt Dialog Box will appear.

5. Enter the text you want to appear when the report is run. This text will prompt you for your selection. For example:
Enter a Client Number:
6. Enter a Default prompt. The Default prompt is used if the user chooses OK without entering a prompt. Entering a Default prompt is optional.
7. Choose OK.
You return to the Search type that you selected.
8. Define the rest of the settings for your search and choose OK.
9. Choose OK to close the Search Dialog Box.
When you run your report, a Dialog Box will appear asking "Enter a Client Number:" Type in a number and choose OK.
NOTES:
1. There is an example report with a prompt in the SAMPLE_REPORTS.ASK file.
2. The default prompt determines what askSam searches for if the user chooses OK without entering a prompt. If you enter an asterisks ( * ) as the default prompt for a Search in Field, askSam will retrieve all Documents.
3. The Prompt button in the Search Dialog lets you define a prompt without using one of the other search dialogs (Numeric, Date, Field, Proximity). If you use the Prompt button askSam does a full-text search for the word or phrase entered at the prompt.
Sorting and Grouping Documents In A Report
When you create or edit a report, you can define how the report should be sorted and grouped. Choose REPORT -> SORTING AND GROUPING to choose the fields you wish to sort and
group on.

See the chapter on Sorting and Simple Outputting for a complete description of the Sort Dialog Box. The Group function is described later in this chapter.
Report Layouts
You design and edit the layout of your reports in the Report Editor. You access the Report Editor by choosing to edit or create a report. The Report Editor screen looks similar to the standard askSam screen, but the Report Toolbar replaces the Search Line, and a list of field names appears on the screen. You have complete control over the layout of your report. You choose the fields to include in the report, where the fields should be positioned, and how the report should be formatted.

NOTE: To create a report you can use the mouse, menus, and buttons to place fields and other commands into the report. You can also simply type field names into the report.
Placing Fields In A Report
Field placement is the major task when designing a report. askSam allows you to position fields by Dragging them from the Field List and placing them in your report. You can also type field names directly into the report. You can also reposition fields by dragging and dropping them. When you run a report, the contents of the field will be output where the field name appears in the report layout.
To Place Fields In A Report:
1. Go to the Report Editor (by creating a new report or by editing an existing report).
2. Select the field you want from the Field List and Drag it to the proper position in the report (or choose REPORT -> INSERT FIELD).
To Drag a field, place the mouse pointer on the field name. Press and hold down the left mouse button while moving the mouse to the desired position. Then release the button.
The field name will be inserted.

NOTE: You can position fields using tabs or by inserting spaces. When you drag a field from the Field List , the field will be positioned using a tab.
3. Click on the button after the Field Name to modify settings for the field. (The Field Settings are described in the next section.)
4. Repeat this for any other fields you want included in your report.
NOTES:
1. If you are not using a mouse, there are two alternative methods for placing a field in the Layout Editor:
· You can move the cursor to the position where you want the field and type the field name. The section "Editing Report Layouts" (later in this chapter) provides more details.
· Place the cursor in the report screen where you want to insert the field. Then choose REPORT ->
INSERT FIELD (or press ALT+P). Select the field name you want to insert and the settings for the field. Choose OK.
2. The Field List displays a list of field names. This list comes from the fields listed in the Entry Form. If the Field List is not displayed, exit the Report Menu, choose TOOLS -> ENTRY FORM and add field names to your Entry Form. See the
chapter Working with Entry Forms for more information.
3. When a field is placed in a report, the contents of that field will be output starting where the first 11/04/2000letter in the field name is placed.
|