Solved

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

Posted on 2004-09-30
1
873 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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.
How to increase the row limit in Jasper Server.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now