Specifications

CHAPTER 24 DataWindow Expression and InfoMaker Functions
Users Guide 631
What you want to do
Suppose you are working with the Fin_code table in the Enterprise Application
Sample Database. The Fin_code table has three columns:
Table 24-1: Columns in the Fin_code table
You create a report using the Code and Description columns. You want to know
the number of null values in the Description column.
How to do it
In the report, you create a computed field that uses functions to display the
number of null values in the Description column.
For the sake of demonstrating the use of functions, the following computed
fields are created in the Summary band of the report (with text objects that tell
you what information each computed field is providing):
Count(description for all)
counts the number of descriptions (that are not null);
Sum(If(IsNull(description), 1, 0))
returns a 1 if the description column is null, a 0 if the description column is not
null, and then adds the total;
Count(id for all)
counts the number of IDs (which is also the number of rows);
Sum(If(IsNull(description), 1, 1))
adds the number of nulls and not nulls in the description column (which is the
total number of rows) and should match the result of the
Count( id for all ) function; and
IsNull(description)
evaluates whether the last row in the table has a description that is null. The
return value of the
IsNull function is true or false.
Column What the column is
Allows null
values?
Code Unique financial identifier (primary key) No
Type Code type: expense or revenue No
Description Code description: the department incurring
the expense or getting the revenue
Yes