I'm trying to achieve the appropriate grouping to be shown on SSRS
report which is driven by the 'weekly' or 'monthly' parameter defined in SSRS
(not a argument for sproc). For that I'm using following in the Category Groups expression for the field called "Date" (format is '2014-03-01' as example):
=IIF(
Parameters!date_range.value="Weekly",
DATEPART("week", Fields!Date.Value),
DATEPART("month", Fields!Date.Value)
)
This results in the following exception:
The Value expression for the field ‘Date’ contains an error: Argument 'DateValue' cannot be converted to type 'Date'. (rsRuntimeErrorInExpression). An error has occurred during report processing. (rsProcessingAborted)
Why?