I'm using report viewer and trying to create dynamic groupings on my table. Before the report is generated, I have a popup that ask if the report generated should be grouped by category
or not.
I have two datasets, one called ReportParameterDTO
and the second is called LoanDTO
The tablix is connected to the dataset LoanDTO
. I want to create a parent grouping expression for that tablix such that if the first value of ReportParameterDTO.GroupByCategory
is true, then it should group, otherwise do nothing.
What I tried
=IIF(First(Fields!GroupByCategory.Value, "ReportParameterDTO") = true, Fields!Category.Value, ""))
It gives me back and error around Fields!GroupByCategory.Value
and the error within the error list states that A group expression for tablix includes an aggregate function.
The IIF Expression will compile if I use Field Values from LoanDTO
but I don't want to do that.