Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-09-30
1
Medium Priority
?
892 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 2000 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

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.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

972 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