Solved

HideDuplicates Error in Expression

Posted on 2010-11-18
3
1,927 Views
Last Modified: 2012-05-10
I have a report parameter on my SSRS report which will select the type of output depending on the chosen option. There are 2 items in the dropdown (Excel and PDF).  I have created a group named GroupID, so the 2 selections in the HideDuplicates property of the textbox is Dataset1 and GroupID.
I want to Hide duplicates for when the user selects Excel ,but not to hide the duplicates for when PDF is selected. Since the "Containing group or dataset" field has an expression option next to it, I assume you are able to put in an expression for which dataset to use. Here is my expression:

=iif(Parameters!OutputTo.Value = "Excel", DataSet1, GroupID)

It gives me the following error:

The value ‘=iif(Parameters!OutputTo.Value = "Excel", DATASET1, GroupID)’ of the HideDuplicates property of the textbox ‘Fld1’ is invalid. This value is the name of a group or data set over which to apply the hiding: it should either be the name of a group containing the current group or, to hide duplicates over the entire data set, the name of the current data set.

I've tried Dataset and GroupID with and without quotes to no avail.

Any ideas on how I can get around this error?

Thanks!
0
Comment
Question by:ahf50
3 Comments
 
LVL 15

Accepted Solution

by:
Tim Humphries earned 250 total points
ID: 34171040
Hi,

I don't think you can place an expression in the HideDuplicates property - there is usually an explicit option to do this but there isn't for this property - you can only select the scope or None.

One way around this would be to duplicate your table and set the visibility property on the table based on your parameter selection and have one table with hide duplicates set and have it not set for the other.

Tim
0
 
LVL 27

Assisted Solution

by:planocz
planocz earned 250 total points
ID: 34173814
you have to change your SP so that the report parameter that is picked by the user is passed back to the SP and in the SP change the code to select only that parameter to display back into the dataset to the report. And as for the hide dups, that is do per detail row per item from the dataset.
0
 

Author Closing Comment

by:ahf50
ID: 34176194
I think both responses are valid.  I created 2 detail rows.  I  then manipulated the HideDuplicates properties at the detail row level.  Then, check the report parameter to show/hide the appropriate detail row.  Thanks for all your help.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

14 Experts available now in Live!

Get 1:1 Help Now