Custom criteria are used to dynamically provide criteria values to pre-defined queries.  


For example, if you need to run daily or monthly reports you may want the report to "know" what today is or what this month is.  In those cases, you can create your own criteria answers to the prompt.




Custom criteria are defined by enclosing the Criteria response with curly braces '{ }'. The string between the braces is the name of the custom criteria which are defined in CustomCrit file.


The CustomCrit file is created in your work account during the account activation procedure.  This file can be customized as required and takes 3 attributes:


001 Criteria Name.  This is the string displayed between the braces {..}.

002 CritFunction

003 Option


CritFunction values:

Attribute 1

Attribute 2

Attribute 3

Description

User Port

@PIB


returns the user's logged on port.

Application user

@WHO


returns the name of the system user that's logged on.

System user

@USER


returns the name of the application user that's logged on.

Logged on account

@ACCOUNT


returns teh name of the account currently logged on.

Today's date

DATE()

Valid date conversion (D4/, D2-...)

returns today's date.

Current time

TIME()

Vate time conversion (MTS, MTH...)

returns current time.

Call Subroutine

SUB

Name_of_sub

Call a custom subroutine










Custom criteria subroutines require a single parameter used to returned the criteria value.