1
votes

I'm created 2 reports in SSRS 2008. I now plan on merging the reports into one and allow users to select report type via a drop down option.

The reports bring back the same data but are grouped differently.

Here lies the problem, I can't figure out how to alter the grouping depending on the report type.

Basically I want to do this

when Parameters!Report_Type.Value = "D" group by Fields!txiii_commodity.Value else no group

I've tried iif, and switch but never get the desired results.

Could someone please help.

Thanks in advance

Chris

1

1 Answers

1
votes

I did this with a very simple example. Sample dataset:

enter image description here

Create a report with one group:

enter image description here

Grouped on expression:

=IIf(Parameters!Report_Type.Value = "D", Fields!txiii_commodity.Value, "Ungrouped")

Also used this to display the Group column in the report.

Results:

enter image description here

enter image description here