Solved

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

Posted on 2004-09-30
1
886 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
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.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

617 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