=IIf(Parameters!Group2.Value.equals(""), false, Fields(Parameters!Group2.Value).Value)
What I am trying to do is if the value of the Group2 parameter = "" turn off grouping. Group2 is assigned a value from the following custom code:
Function Group2Value() As String
Dim Group As String
Group = ""
Select Case Report.Parameters!ReportType.Value
Case "1"
Group = ""
Group = "CategoryID"
Group = "StockFamilyID"
Group = "GroupID"
Group = ""
Group = "SaleableGLCodeID"
Return Group
End Function
However this is not working.
Can grouping be disabled and if so what am I doing wrong?
Thanks in advance.
can't you just set grouping to =1 ?
this technique can also be used in a matrix when you need an extra grouping for e.g. to display count AND amount but don't physically want to group the data|||
Yes, Grouping can be disabled.
Try doing the entire calculation in the custom code and place the name of the function in the expression for Grouping.
The Grouping expression as =Code.Group2Value()
Now based on whatever value is returned from the function Group2Value, the grouping will be done accordingly.
Regards,
Pradeep
没有评论:
发表评论