Home > Support > Resource Center > askSam 4 Documentation > Chapt11: Output Separator

First Document Previous Document Next Document Last Document Search Help

     Chapter 11     

     (continued)     

     The askSam Report Writer      


Field Settings (Insert Field Dialog Box)

The Insert Field Dialog Box serves two purposes. It lets you insert fields into a report, and it lets you define settings for the fields. You access the Insert Field Dialog Box by choosing REPORT ->

INSERT FIELD or clicking on the button that appears after a field (or placing the cursor immediately after the field and pressing CTRL+ENTER).


To Define Settings For A Field:

1.     Click on the button after the field you want to modify.

The Insert Field Dialog Box will appear.



2.     Modify any of the following settings and choose OK.

SETTING     DESCRIPTION


Field Length     Selects whether the field output in the report is a single line      field (default value) or a multiple line field.


Wrap / Truncate Field     Determines whether the field is truncated or wrapped. You can      wrap a field at the right margin (default value), or wrap it in a      specific column. A field can also be truncated at a specific      column.


Retain Line Breaks     Sets whether the field output will retain the original line breaks      or wrap in the margins set in the report (default value). This      setting is most important when you output a multiple line field.


Relative Spacing     When you insert a field in a report, the field can be output at      the position where it is inserted (default value), or it can be      positioned relative to the previously output field. For example,      you might want to output the State field one space after the      City field (Philadelphia, PA).


Conditional Field     Defines a set of conditions and how the field output should be      affected by these conditions. For example, if the field is empty,      output “N/A”.


Output Text Before     Enter a text to output before the field.


Output Text After     Enter a text to output after the field.


Group Field     Sets the field as a group field.


Total Field     Totals the field.


Required for Selection     If set to yes, your report will only include Documents that      contain this field. The default value for this setting is No.


Output All Occurrences     Sets whether the report will output all occurrences of a field or      only the first occurrence. The default value is No.


Field Terminator     Defines the character that designates the end of a field. The      default value is the closing bracket “]”.


NOTE: Many of these settings are described in further detail in the next sections.



Field Length

In the Insert Field Dialog Box, the “Field Length” setting lets you define whether a field is single line or multiple lines.


Single Line - when askSam outputs a single line field, the information following the field name is output until a closing bracket "]" or the end of a line is encountered (whichever comes first). In the Report Editor you'll see:



Multiple Line - When a field is defined as multiple line, the information following the field name is output until a closing square bracket "]" is encountered or until the end of the Document.

A multiple line field does not necessarily have to contain multiple lines of information. Whatever information is contained in the field will be output. In the Report Editor you'll see:



NOTES:

1.     The “Field Terminator” setting in the Insert Field Dialog Box lets you define what character terminates a field. You can also define a blank line as the field terminator.

2.     The “Retain Line Breaks” setting in the Insert Field Dialog Box determine whether the field output will retain the original line breaks or wrap in the margins set in the report (default value). This setting is most important when you output a multiple line field.

3.     The SAMPLE_REPORTS.ASK file contains reports using multiple line fields.


Wrap / Truncate Field

To prevent a field from overwriting the field that follows it, you can wrap or truncate the field. In the Insert Field Dialog Box, the “Wrap / Truncate Field” setting lets you define how a field will be wrapped or truncated.



 

Wrap at right margin  wraps the field contents when they reach the right margin of your report.  In the Report Editor you'll see:



Wrap at column wraps the field contents in a column. In the Report Editor you'll see:



Truncate field to  truncates the field at the defined column. In the Report Editor you'll see:



Example report output with wrapped and truncated fields:




NOTE: The “Field Length & Wrapping” report in the SAMPLE_REPORTS.ASK file provides an example of defining field lengths in a report.


Spacing Between Fields

Fields are output starting in the column where the first letter of the field name is located.

Some reports, however, require one field to be positioned relative to the previous field. For example outputting a city field followed by a comma and then the state. To handle this, askSam allows you to define Relative Spacing. Relative Spacing allows you to place fields in a position relative to the preceding field.

Example:

To output a city, state format (e.g., Ann Arbor,  MI) from a database containing a City field and a State field:

1.     In the Report Editor select the City field from the Field List and Drag it to the proper position in the editor.

2.     Type a comma after the City field (or click on the button following the City field and enter the comma in the “Output Text After” option).  

3.     Select the State field from the Field List and place it after the City field.

4.     Click on the button that appears after the State field.

The Insert Field Dialog Box will appear.

5.     Set the “Relative Spacing” setting to “1”

6.     Choose OK

The report will look like this:



NOTES:

1.     For a single space between fields you do not need to use the Relative Spacing command. Only when multiple spaces are involved is it necessary to use the Relative Spacing command.

2.     Relative Spacing permits a minimum value of 0 and a maximum of 30 characters between fields.

3.     The “Relative Spacing” report in the SAMPLE_REPORTS.ASK file provides an example of relative spacing in a report.


Output All Occurrences Of A Field

This Option determines how multiple occurrences of a field within a Document are handled.

        If set to YES, all occurrences of a field are output.

        If set to NO, only the first occurrence of a field is output.

askSam is very flexible in the way you can define structure for your data. If, for example, you have additional telephone numbers you wish to enter into a Document containing only one phone field, you can simply add another field.

     Name[ Danielle Welch

     Phone[ 604-555-4567

     Phone[ 604-555-4566

     Phone[ 604-555-4565


With Output All Occurrences of a Field set to YES, the request:




Would output:



With Output All Occurrences of a Field set to NO, the request would output:



Placing Text in a Report

askSam allows you to insert text into reports. These texts can be used as labels to describe parts of your report, or they can be longer text passages (sentences, paragraphs, etc.)

There are two ways to enter texts into a report:

·     You can use the “Output Text Before” and “Output Text After” settings in the Insert Field Dialog Box.

·     You can type the desired text directly into the report.


Adding Text with the “Output Text Before” and “Output Text After” Settings

1.     In the Report Editor, click on the button that appears after the field where you want the text inserted.

The Insert Field Dialog Box will appear.

2.     Enter the text you want to insert in the “Output Text Before” and/or the “Output Text After” options. The text is inserted exactly as you enter it, so leave all necessary spaces at the beginning and end of the text.

3.     Choose OK.

You will return to the Report Editor. The text you entered is displayed in the report.

NOTES:

1.     Text inserted with the “Output Text Before” and “Output Text After” settings is only output in the report if the associated field is not empty.

Typing Text into a Report:

1.     In the Report Editor place the cursor where you want the text inserted.

2.     Enter the text.

If your text is longer than one line, askSam will automatically wrap the text to the next line. The standard edit (Cut, Copy, and Paste; Drag and Drop Editing, etc.) and formatting features are available.

NOTES:

1.     Texts you type into a report are output for each Document output in the report. If you wish to output a “Title” (or Header) for your report, see the section on Report Headers and Footers.

2.     To edit a text already in a report, use the normal edit functions of the Report Editor.  


Output Separator

The Output Separator command defines a separator that outputs between Documents in reports.


To Set the Output Separator:

1.     Choose REPORT -> OUTPUT SEPARATOR.

The Output Separator window will open in your report.

2.     Enter a blank line, line of characters (hyphens, underlines, etc), a page break, or other text that you want inserted between Documents in the report.

Example report output with no Output Separator:


Example report output with blank line as Output Separator:



Quick Downloads

 

How people use askSam

 

Surf Report Newsletter

Subscribe today to receive our FREE monthly newsletter. The Surf Report includes tips, articles, and information about new releases, upgrades, free utilities, and special promotions. Sign up today!


Read Back Issues »
 

"askSam is an essential part of my software tool chest. I can research and collect data from anywhere and any source. Once it is in askSam I can edit, rearrange, organize, and search the information easily. Then I can present it and make it totally useful for other people via the web or CD. Fantastic!"

-- Valda Hilley, Author, Literary Agent, Teaching Consultant, Pack rat, and President, Convergent Press, Ltd.

 

Seaside Software Inc. DBA askSam Systems, 121 S Jefferson Street, Perry FL 32347
Telephone: 800-800-1997 / 850-584-6590   •   Email: info@askSam.com   •   Support: http://www.askSam.com/central.asp
© Copyright 1985-2012   •   Privacy Statement