how to count for number of groups ? [message #61686] |
Mon, 25 July 2005 10:53  |
Eclipse User |
|
|
|
Originally posted by: tomvo.hahaha.be
Hi,
I've got a nice total.count() in some of my reports that tell me how many
detail rows i have.
Now I have the need to count the number of 'groups', but I can't find a way
to do it.
does anyone have a clue ?
Thx,
tom.
|
|
|
|
Re: how to count for number of groups ? [message #62303 is a reply to message #61949] |
Thu, 28 July 2005 11:05  |
Eclipse User |
|
|
|
Originally posted by: tomvo.hahaha.be
Thanks Jane,
Does the job nicely.
gr,
tom
"Jane Tatchell" <jtatchell@actuate.com> wrote in message
news:dc6koa$i80$1@news.eclipse.org...
> Does Total.countDistinct(row["Your grouping column"]) do what you need?
>
> Here is the documentation for this function.
>
> Total.countDistinct
> This function computes the number of distinct values within the group or
> data set. The expr argument gives an expression used to group the values.
> The expression refers to a data row column. Null values are counted as one
> distinct value.
>
> Syntax
> Total.countDistinct ( expr [, filter [, group ]] )
>
> Arguments
> a.. expr
> The expression that identifies the unique values. The expression should
> reference at least one data row column. See additional description above.
> The data type can be number, string or date.
> b.. filter
> An optional filter condition. See description above.
> c.. group
> An optional group identifier. See description above.
> Returns
> The number of distinct values within the group or data set. Returns zero
> if
> no rows were available.
>
> Example
> Suppose we want to know the number of different countries represented by a
> group of students. We can define a data item that uses the following
> expression:
>
> Total.countDistinct( row.Country )
> In this statement row.Country is a column that contains the name (or code)
> for the student's home country. Suppose that some rows contain null,
> meaning
> that we don't know the home country. We can exclude such rows from our
> count
> with the following statement:
>
> Total.countDistinct( row.Country, row.Country != null )
>
> --
> Jane Tatchell
> BIRT documentation lead
>
> "Tom Van Overbeke" <tomvo@hahaha.be> wrote in message
> news:dc2ud6$hte$1@news.eclipse.org...
>> Hi,
>>
>> I've got a nice total.count() in some of my reports that tell me how many
>> detail rows i have.
>>
>> Now I have the need to count the number of 'groups', but I can't find a
> way
>> to do it.
>>
>>
>> does anyone have a clue ?
>>
>> Thx,
>>
>> tom.
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.44377 seconds