St Sauveur Accomodation | Owner Direct
Great specials
Purchase your Section 508 Compliance Support guide now!
Purchase your Section 508 Compliance Support guide now!
Operators
Operators specify what happens to the values on either side of the operator. Operators are similar to functions, in that they manipulate data items and return a result.
(
Inserts an open parenthesis in your expression.
Syntax
(exp)
)
Inserts a close parenthesis in your expression.
Syntax
(exp)
*
Multiplies two numeric values.
Syntax
value1 * value2
,
Separates expression components.
Syntax
exp(param1, param2)
/
Divides two numeric values.
Syntax
value1 / value2
||
Concatenates strings.
Syntax
string1 || string2
+
Adds two values.
Syntax
value1 + value2
-
Subtracts two numeric values or negates a numeric value.
Syntax
value1 - value2
or
- value
<
Compares values against a defined value and retrieves the values that are less than the defined value.
Syntax
value1 < value2
<=
Compares values against a defined value and retrieves the values that are less than or equal to the defined value.
Syntax
value1 <= value2
<>
Compares values against a defined value and retrieves the values that are not equal to the defined value.
Syntax
value1 <> value2
=
Compares values against a defined value and retrieves the values that are equal to the defined value.
Syntax
value1 = value2
>
Compares values against a defined value and retrieves the values that are greater than the defined value.
Syntax
value1 > value2
->
Separates the components in a literal member expression.
Syntax
[namespace].[dimension].[hierarchy].[level]->[L1]
>=
Compares values against a defined value and retrieves the values that are greater than or equal to the defined value.
Syntax
value1 >= value2
and
Returns TRUE if the conditions on both sides of the expression are true.
Syntax
arg1 AND arg2
auto
Works with summary expressions to define the scope to be adjusted based on the grouping columns in the query. The scope is context dependent.
Syntax
aggregate_function ( expression AUTO )
between
Determines if a value falls in a given range.
Syntax
name BETWEEN value1 and value2
case
Works with When, Then, Else, and End.
Syntax
CASE expression { WHEN expression THEN expression } [
ELSE expression ] END
contains
Determines if a string contains another string.
Syntax
string1 CONTAINS string2
currentMeasure
Keyword that can be used as the first argument of member summary functions.
Syntax
aggregate_function( currentMeasure within set expression
)
default
Works with the LOOKUP construct.
Syntax
lookup(....) in (....) DEFAULT(....)
distinct
A keyword used in an aggregate expression, to include only distinct occurrences of values. See also the function unique.
Syntax
DISTINCT dataItem
Example
count ( DISTINCT [OrderDetailQuantity] )
Result: 1704
else
Works with the If or Case constructs.
Syntax
IF (condition) THEN .... ELSE (expression) , or CASE
.... ELSE expression END
end
Works with the Case or When constructs.
Syntax
CASE .... END
ends with
Determines if a string ends with a given string.
Syntax
string1 ENDS WITH string2
for
Works with summary expressions to define the scope of the aggregation in the query.
Syntax
aggregate_function ( expression FOR expression { , expression
} )
for all
Works with summary expressions to define the scope to be all the specified grouping columns in the query. See also FOR clause.
Syntax
aggregate_function ( expression FOR ALL expression {
, expression } )
for any
Works with summary expressions to define the scope to be adjusted based on a subset of the grouping columns in the query. Equivalent to FOR clause.
Syntax
aggregate_function ( expression FOR ANY expression {
, expression } )
for report
Works with summary expressions to set the scope to be the whole query. See also FOR clause.
Syntax
aggregate_function ( expression FOR REPORT )
if
Works with the Then and Else constructs.
Syntax
IF (condition is true) THEN (action) ELSE (alternate
action)
in
Determines if a value exists in a given list of values.
Syntax
exp1 IN (exp_list)
in_range
Determines if an item exists in a given list of constant values or ranges.
Syntax
expression IN_RANGE { constant : constant [ , constant
: constant ] }
Example 1
[code] IN_RANGE { 5 }
Result: This is equivalent to [code] = 5
Example 2
[code] IN_RANGE { 5: }
Result: This is equivalent to [code] >= 5
Example 3
[code] IN_RANGE { :5 }
Result: This is equivalent to [code] <= 5
Example 4
[code] IN_RANGE { 5:10 }
Result: This is equivalent to ( [code] >= 5 and [code] <= 10 )
Example 5
[code] IN_RANGE { :5,10,20: }
Result: This is equivalent to ( [code] <= 5 or [code] = 10 or [code] >= 20 )
is missing
Determines if a value is undefined in the data.
Syntax
value IS MISSING
is null
Determines if a value is undefined in the data.
Syntax
value IS NULL
is not missing
Determines if a value is defined in the data.
Syntax
value IS NOT MISSING
is not null
Determines if a value is defined in the data.
Syntax
value IS NOT NULL
like
Determines if a string matches the pattern of another string.
Syntax
string1 LIKE string2
lookup
Finds and replaces data with a value you specify. It is preferable to use the CASE construct.
Syntax
LOOKUP (name) in (value1 --> value2) default (expression)
Example
lookup([Country]) in ('Canada'-->([List Price] * 0.60),
'Australia'-->([List Price] * 0.80)) default([List Price])
not
Returns TRUE if the condition is false, otherwise returns FALSE.
Syntax
NOT arg
or
Returns TRUE if either of the two conditions on both sides of the expression are true.
Syntax
arg1 OR arg2
prefilter
Performs a summary calculation before applying the summary filter.
Syntax
summary ([expression] PREFILTER)
rows
Counts the number of rows output by the query. Use with Count().
Syntax
count(ROWS)
starts with
Determines if a string starts with a given string.
Syntax
string1 STARTS WITH string2
then
Works with the If or Case constructs.
Syntax
IF (condition) THEN ...., or CASE expression WHEN expression
THEN .... END
when
Works with the Case construct.
Syntax
CASE [expression] WHEN .... END
Define a Prompt Control
Define a Prompt Control
Prompts help your users quickly find the information they need in a report. Prompts are generally defined in reports. However, you can change the behavior of prompts in the studios by modifying the definition of dimensions or query subjects in the model.
This is useful for query items, such as ProductTypeCode, whose values are not shown in a report but are useful for filtering data. In general, it is better to define type-in prompts in the reports to make use of the additional prompt features. However, your users cannot modify some variables. For these variables, you can use IBM® Cognos® Framework Manager instead of the reports to define type-in prompts.
The Prompt Info properties set in Framework Manager give you the ability to control default filtering and prompting. The properties are used by:
- Query Studio to create a filter expression and set the use and display items in a prompt and prompt query
- the Build Prompt Page tool in Report Studio to create a filter expression and set the use and display items in a prompt and prompt query
- generated prompts in Report Studio to set the use and display items in the prompt and prompt query
The syntax for using a prompt as a value is
??
You can use prompts in
- parameter maps
- session parameters
- expressions, including filters and calculations
Steps
- Click the query item.
- In the Properties pane, click the Properties tab.
- Click the plus sign (+) next to the Prompt Info property.This is a compound query item property.
- Modify the following properties to reflect the behavior you require.GoalPropertySet the type of prompt control that is generated when the report is run.Prompt TypeSet the generated prompt as part of a series of generated cascading prompts.Cascade On Item ReferenceSpecifies which query item is displayed to the report user in the prompt.The values in the prompt are data values of the query item.Each value in the prompt is associated with a value in the query item specified in the Use Item Reference property.Display Item ReferenceSpecifies which query item is passed from the prompt to the filter.Each value is associated with a value in the query item specified in the Display Item Reference property.Use Item ReferenceSpecifies which query item is used in the filter expression to retrieve data.Filter Item Reference
Prompt Type Property
The Prompt Type property sets the type of prompt control that is generated when the report is run, such as an edit box or a pull-down list.
The default value for this property is Server Determined.
Note: Prompt types set on attributes are now processed. The report user will see the prompt that matches the prompt type on the attribute. Because prompt types on attributes were not processed in the previous release, some differences may occur.
Value | Prompt Control |
Server Determined | The type of prompt control is based on information in the server, such as the data type of the query item. |
Edit Box | A simple text box. If the data type of the column is date or dateTime, this value generates a date or date-time control as well as the text box. |
Select Date | A date control with a calendar interface. |
Select Date/Time | A date-time control with a calendar interface. For SAP BW metadata, this value is not relevant. |
Select Interval | A date-time interval control. For SAP BW metadata, this value is not relevant. |
Select Time | A time control that filters data based on the selected time period. For example, if you define a Select Time prompt for Order Time, the user can use the time control to show all orders placed after 1:00, or all the orders placed between 10:00 and 11:00. If you are referring to a time member, you must use the exact values only. If you are using a range, the end points of the range must correspond to values in the data source. |
Select Value | A drop-down list. |
Select with Search | A list control so that users can search for values. For SAP BW metadata, this value is not relevant. |
Select with Tree | A tree prompt control for prompts that are based on a hierarchy node. |
Note: If the caption is a different datatype than the business key (MUN) for the level, use the Filter Item Reference in conjunction with setting the Prompt Type for the caption. This ensures that the right datatype is used when filtering in the studios.
Cascade On Item Reference Property
The Cascade On Item Reference property indicates that the generated prompt is part of a series of generated cascading prompts. The query item that you reference in this property is the parent item in the cascade. The system prompts the user for the cascade item before prompting them for the current query item.
For example, if you want to prompt for Product Line and then Product within the selected line, set the Cascade On Item Reference property of the Product query item to Product Line.
Display Item Reference and Use Item Reference Properties
The Display Item Reference property specifies which query item is displayed to the user in the prompt. The Use Item Reference property specifies which query item is passed from the prompt to the filter. Each value in the list of display items is associated with a value of the query item specified in the Use Item Reference property.
For example, you want the prompt to display Country Name while using Country Code to retrieve data. Set the Display Item Reference property to Country Name and the Use Item Reference property to Country Code. The prompt for Country Name makes it easy for the report user to select required values. However, using the Country Code in the filter is more efficient for data retrieval.
These properties are used by
- Query Studio to create a filter expression and set the use and display items in a prompt and prompt query
- the Build Prompt Page tool in Report Studio to set the use and display items in a prompt and prompt query
- generated prompts in Report Studio to set the use and display items in the prompt and prompt query
Note: The values of the Use Item Reference and Filter Item Reference properties must be compatible. Otherwise, the report user may receive unexpected results. For more information, see the Filter Item Reference property .
Default: If no values are set, the properties default to the name of the query item.
These properties are used only for data driven prompt controls whose Prompt Type property is set to either Select Value or Select with Search.
Filter Item Reference Property
The Filter Item Reference property identifies the query item used when Report Studio or Query Studio generates a filter. This property can help create more efficient queries by ensuring that a filter uses an indexed numeric column rather than a non-indexed string column.
For example, a report author wants to create a filter for the Country Name query item. You set the Filter Item Reference property to use Country Code instead of Country Name for any filter that uses the Country Name query item.
In another example, a report author wants to create a filter for the Country Code query item that appears in the Orders table. You want that filter to use the Country Code in the Country table because there are fewer rows to read in the Country table so you set the Filter Item Reference in the model to Country.Country Code.
This property is used by:
- Query Studio to create a filter expression
- the Build Prompt Page tool in Report Studio to create a filter expression
Default: If no value is set, the property defaults to the name of the query item.
Using the Filter Item Reference and Use Item Reference Properties
The values of the Filter Item Reference and Use Item Reference properties must be compatible. The value of the Use Item Reference property must be a type that is expected by the Filter Item Reference property. Otherwise, the report user may receive unexpected results. This may occur when a report user creates a filter without creating a prompt page.
In an example model, the Use Item Reference property is set to Employee Number and the Filter Item Reference property is Employee Name. In Report Studio, a report author creates the following filter without creating a prompt page:
Reference.EmployeeName in ?parm1?
Report Studio automatically generates prompts when you create a filter without creating a prompt page. Because the prompt is generated, Report Studio uses the Prompt Info properties from the Employee Name query item in the Framework Manager model.
The Use Item Reference indicates that the values being passed to the filter are employee numbers. The Filter Item Reference is filtering data based on Employee Name. The filter is as follows: Reference].[Employee Name] in ("1", "2"). Since there are no Employee Name values of "1" or "2", the report will be blank.
Using Filter Item Reference for Dimensionally Modeled Relational Metadata
For dimensionally modeled relational metadata, Prompt Info is specified on the attribute with the role of _memberCaption, instead of the level. Although set on the attribute, the Prompt Info properties are processed as if they were on the level. By default, when the level is included in a report, users are prompted to enter MUNs in the level’s prompt. To enter caption values instead, set the attribute’s Filter Item Reference property to itself. When the prompted filter is applied, the filtered values will be based on the attribute values.
For example, the level Product Line has an attribute of Product Line with a role of _memberCaption. If the Filter Item Reference property value is set to to Product Line, report users are prompted to enter Product Line values. If the Filter Item Reference property value is left blank, users are prompted to enter MUNs.
Note: Do not use the Filter Item Reference property with the Select with Tree prompt type. Because a Select with Tree prompt can only filter on a level or hierarchy, setting the Filter Item Reference property will cause an error.
Testing a Prompt
When you test a model object that references a prompt, IBM® Cognos® Framework Manager asks you to enter the prompt value. Framework Manager uses this value for either the duration of the session, or until you clear the prompt value.
You can change the session value of prompt values through the Options dialog box. This dialog box is available when you modify a dimension or query subject, or define a calculation, filter, query set, or complex relationship. You can change the prompt value at the time that you are testing the expression that references that value.
If you select the Always prompt for values when testing check box in the Prompt dialog box, Framework Manager prompts you for a value every time you test the object. When updating the object or performing a count, Framework Manager uses the existing prompt value, if one exists.
A prompt on a query item in a model query subject is associated only with that query item. A prompt on a query item in a data source query subject is associated with the entire query subject and therefore, the prompt appears when you test any query item in the query subject.
SAP BW Variables
Name Property
This property is a string value.
SAP BW equivalent: VARIABLE_NAME
Restrictions: Read-only.
Caption Property
The string value for this property is a composite and locale-dependent. Each locale in the model should be represented by a custom property whose value is the locale name. For example, if the locales en-ca and fr-fr exist in the model, define two custom properties named en-ca and fr-fr.
The default value is obtained from SAP BW.
Default Low Caption and Default High Caption Properties
The value for each of these properties is a composite, locale-dependent string value. Each locale in the model should be represented by a custom property whose value is the locale name. For example, if the locales en-ca and fr-fr exist in the model, define two custom properties named en-ca and fr-fr.
The default value is obtained from SAP BW.
Restrictions: The Default High Caption property is applicable only for variables with a Selection Type of interval.
Fixed Value Property
This property is a boolean property that determines whether the value of the variable can be changed. If this property is set to true, your users are not prompted for the associated variable, and the default value is always applied.
The default value is false.
Restrictions: This property is not applicable to hierarchy variables.
Selection Type Property
The possible values are value, interval, complex, multiValued.
Value | SAP BW Equivalent |
value | SAP_VAR_SEL_TYPE_VALUE |
interval | SAP_VAR_SEL_TYPE_INTERVAL |
complex | SAP_VAR_SEL_TYPE_COMPLEX |
multiValued | SAP_VAR_SEL_TYPE_COMPLEX |
Restrictions: Read-only.
Entry Type Property
The default value is obtained from SAP BW.
Value | SAP BW Equivalent |
optional | SAP_VAR_INPUT_TYPE_OPTIONAL |
mandatory | SAP_VAR_INPUT_TYPE_MANDATORY |
mandatoryNotInitial | SAP_VAR_INPUT_TYPE_MANDATORY_NOT_INITIAL |
Restrictions: Read-only.
Data Type
The default value is obtained from SAP BW.
Value | SAP BW Equivalent |
xsdString | CHAR |
xsdDate | CHAR The VAR_TYPE value is SAP_VAR_TYPE_MEMBER and the reference dimension is based on 0CALDAY. |
xsdFloat | FLTP |
xsdDatetime | DATS |
xsdInt | NUMC, DEC, INT1, INT2, or INT4 |
xsdLong | NUMC, DEC, INT1, INT2, or INT4 |
xsdMUN | CHAR |
Restrictions: Read-only.
Default Low Value and Default High Value Properties
Each of these properties specifies a range of values.
The default value is obtained from SAP BW.
Restrictions: The Default High Value property is applicable only for variables with a Selection Type of interval.
Description Property
This property is a string value.
SAP BW Variable Type Property
The possible values are numeric, characteristic, hierarchy, or hierarchicalNode.
The default is obtained from SAP BW.
Restrictions: Read-only.
Prompt Type Property
The default value depends on the type of the variable. If the value of this property is not one of the predefined values, it is assumed to be hierarchyPickList.
Value | Restrictions |
typeIn | Required for numeric variables and optional for characteristic values |
pickList | Optional for characteristic variables |
calendar | Only for characteristic variables based on 0CALDAY |
hierarchyPickList | Optional for all presentation hierarchies |
notApplicable | Required for hierarchy variables |
Restrictions: Read-only for some types of variables such as characteristic and formula.
Level Restriction Property
This property is a numeric value.
The default value is 1.
Restrictions: Applicable only for hierarchical node variables with a Prompt Type of hierarchyPickList.
Trim Levels Property
This property is a string value that reduces the number of members in a hierarchical picklist. If the property is set to zero (0), members from all levels of a hierarchy are included in the prompt. You can also specify a range such as 2:4 to include only the members from certain levels. If the starting and ending ranges are the same, such as 3:3, only members from that level will be included.
The default value is zero (0).
Restrictions: Applicable only for characteristic variables with a Prompt Type of hierarchyPickList.
Use Default Values Property
This property is a boolean property that determines whether the default values will be used. If this property is set to true, your users are not prompted for the associated variable, and the default value is always applied.
The default value is false.
Initial Number of Pick List Values Property
A numeric value that specifies the initial number of values used to populate a picklist, hierarchical picklist, or prompt.
The default value is zero (0), which means all.
Show Key and Caption Property
To show keys and captions for SAP BW variables, set this property to true. This property is applicable only for pick list prompts and hierarchy node prompts.
The default value is false.
Numeric Variable Property Values
The following variable properties are applicable to numeric variables:
Property | Default value |
Type | numeric |
Caption | |
Selection Type | value |
Entry Type | |
Data Type | |
Default Low | |
Default High | |
Prompt Type | typeIn |
Fixed Value | false |
You can change the default values for a numeric variable except for the Prompt Type property, which is read-only.
Hierarchy Variable Property Values
The following variable properties are applicable to hierarchy variables:
Property | Default value |
Type | hierarchy |
Caption | |
Selection Type | value |
Entry Type | obtained from SAP BW |
Data Type | xsdString |
Default Low | |
Default High | |
Prompt Type | not applicable |
Because hierarchy variables are resolved entirely at run time, all these properties are read-only.
Characteristic Variable Property Values
There are two kinds of characteristic variables: characteristic value and hierarchy node. Characteristic values variables select characteristic values. Hierarchy node variables select values from any position in a presentation hierarchy.
Characteristic Value Variable Property Values
The following variable properties are applicable to characteristic value variables:
Property | Default value |
Type | characteristic |
Caption | |
Selection Type | obtained from SAP BW |
Entry Type | obtained from SAP BW |
Data Type | xsdString |
Default Low | If the entry type is value or complex, the default property is shown. If the entry type is interval, the default low property is shown. This value is obtained from SAP BW. |
Default High | If the entry type is value or complex, the default property is shown. If the entry type is interval, the default high property is shown. This value is obtained from SAP BW. |
Prompt Type | typeIn or pickList This depends on the number of members in the referenced dimension. If the value is invalid, typeIn is used. |
Fixed Value | false |
A characteristic value variable for the 0CALDAY dimension is shown in the model as a date. The Data Type property is set to xsdDate and the Prompt Type property is set to calendar. The Prompt Type property is read-only for the 0CALDAY dimension.
Hierarchy Node Variable Property Values
The following variable properties are applicable to hierarchy node variables:
Property | Default value |
Type | characteristic |
Caption | |
Selection Type | value |
Entry Type | obtained from SAP BW |
Data Type | xsdString |
Dimension | obtained from SAP BW |
Hierarchy | obtained from SAP BW |
Default Low | |
Default High | |
Prompt Type | hierarchy PickList You can change the Prompt Type property to typeIn or pickList. |
Trim Levels | zero (0) |
Fixed Value | false |
Maximum Number of Values | 100 |
Picklist Prompts
Each picklist prompt contains a pre-defined number of values. These values are determined by the Maximum Number of Values property.
If the number of actual values is less than or equal to the default number of values, the prompt is generated as a single picklist prompt. If the number of actual values exceeds the default number, two prompts are generated in this order:
- a bound range parameter with a starting value of 1 and an ending value determined by the Maximum Number of Values propertyThis parameter is of the type xsdUnsignedLong and is optional. The name of the parameter is the name of the original prompt followed by _range_prompt. The caption is locale-specific. If this is a multilingual model, you must store the template for the caption in a message file.
- a picklist prompt containing the default number of values
Subscribe to:
Posts (Atom)