Link to home
Start Free TrialLog in
Avatar of ahf50
ahf50Flag for United States of America

asked on

HideDuplicates Error in Expression

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!
ASKER CERTIFIED SOLUTION
Avatar of Tim Humphries
Tim Humphries
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Howard Cantrell
Howard Cantrell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ahf50

ASKER

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.