Solved

MSSQL Reporting Services - Using expressions in layout view eg: Count(Distinct(FieldName))

Posted on 2004-09-30
1
880 Views
Last Modified: 2012-06-21
Hello Experts!

Is there an alternative to using =count(distinct(Fields!FieldName.Value))in layout view?

I get error BC30451 Name 'distinct' is not declared.

Thanks!



0
Comment
Question by:tomfolinsbee
1 Comment
 
LVL 14

Accepted Solution

by:
simon_kirk earned 500 total points
ID: 12246821
Try this instead:

The syntax for CountDistinct() is

CountDistinct (Expression, Scope, Recursive)

Return Value : Integer
Returns the count of all distinct nonnull values of the expression within
the scope

Expression : Variant
The expression to aggregate.  Cannot contain any aggregate functions.
Typicaly this will be something like Fields!<FieldName>.Value

Scope :  String
Name of a DataSet or the name of a Grouping or DataRegion that contains
(directly or indirectly) the report item

Recursive :  Enum
Recursive | Simple (Default).  Indicates whether the aggregate should be
calculated recursively.  Optional.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question