(Contents)

Select Tab

The Select tab establishes selection rules that govern which items are included or excluded from the report. The rules are input as selection criteria and, where more than one item of selection criteria is applied, they have to be linked together by use of the selection logic.

The tab is split into two areas. The top of the tab allows you to input up to 10 lines of selection Criteria. The bottom of the tab is used to input a selection Logic.

What do you want to do?

Edit Selection Criterion Form

Criteria

Note : Field names are input in the same manner as derived fields, they must adhere to the following format: !x_yyyyyyyy

To Create Selection Criteria

  1. Double click in the column adjacent to the first available letter, or alternatively click the Insert button.

    The Insert Selection Criteria form is displayed.

  2. Type in the selection which normally consists of a minimum of three elements:

    Tip: You can click the Insert Field button and use the Select Item From List dialog box to help you type in your selection rule.

    The selection rule would represent something like:

    'include sales ledger accounts greater then A00001'

    The column name can be taken from any of the tables named on the Tables tab. You can also name any of the derived fields.

    The operator can be one of the following:

    Symbol

    Meaning

    >

    Greater than

    <

    Less than

    >=

    Greater or equal

    <=

    Less or equal

    <>

    Not equal

    =

    Equal

    The value is input after the operator. If the field is alpha-numeric then the value must be surrounded by quote marks.

    Thus the completed selection line would look like this:

    !1_ACCOUNT > "A00001"

    Further items may be put onto subsequent lines of the Select tab.

Logic

Once the selection criteria are input, you must complete the logic.

The logic is vital because it determines how each element of the selection criteria relates to the others. The selection logic strictly controls the characters it can deal with and recognises the first character on each line, ranging from A to J. It recognises the & sign to signify AND, it also recognises the / sign to signify OR. Finally it recognises the existence of brackets, (), to nest items of logic.

If items A,B,C and D all had to be true to select an item then type in A&B&C&D.

If either item A or B had to be true type in A/B.

If items A or B have to be true in conjunction with items C and D then type in one of the following statements.

(A&C&D)/(B&C&D)

or

(A/B)&C&D

The second one is more efficient but both will work equally well.

Click into the logic field and type in the correct logic using:

  1. Letters from A to J to represent the selection lines you have used.

  2. A relational character of either '&' (to represent AND) or '/' (to represent OR).

  3. If required you may also use brackets '( )' to isolate parts of the logic.

Finally, following input of the logic, you will select either 'I' or 'E' in order to include or exclude items according to your logic.

In order to illustrate the use of this tab several examples are laid out below.

  1. To include all vehicles in stock at Location 'B' which have a Sales Status of 'A' as long as they have been in stock for less than 90 days.

A

!1_LOCATION = "B"

B

!1_SALESTAT = "A"

C

!1_DATEIN >= !J(TODAY)-90

If

A&B&C

I

  1. To include any vehicle in Location 'B'. As well as this the report should also include any vehicle in Location 'A' as long as it has a Sales Status of either 'I' or 'X'.

A

!1_LOCATION = "B"

B

!1_LOCATION = "A"

C

!1_SALESTAT = "I"

D

!1_SALESTAT = "X"

If

A/(B&(C/D))

I

Note: Note the use of the brackets in the logic statement. These are used to split out the selection criteria and allow them to be formulated separately. Brackets may be nested as deeply as space allows.

  1. To include a Prospect record if the date of the last contact falls between two dates which are being prompted for at the time the report is being run.

A

!1_LCONTACT >= !0_LODAT OR !0_LODAT=0

B

!1_LCONTACT <= !0_HIDAT OR !0_HIDAT=0

C

D

If

A&B

I

Note: If you are prompting for values you should consider using the type of format shown in Example 3 above, in order to allow you to leave the prompt fields blank.

  1. To include all Accounts which have an outstanding balance of more than £500 and a Category code of "I".

A

!1_BASETOTL > 500 AND !1_CATEGORY="I"

B

C

D

If

A

  I

Note: You can see from Example 4 that two statements could be included on one line of selection. This can be very useful particularly where a lot of selection rules need to be applied.

Once again please note that in all of the examples above, any character values that are being used are surrounded by quote marks.

Include or Exclude?

The final part of the selection routine is to decide whether the criteria and logic which have just been input should be used to include the items in the report or exclude them.

Click the Include or Exclude radio button accordingly.

(Contents)