Two issues today.
I've seen a lot of web posts where beginners get an error or warning when doing a Sum on a certain category of data in a dataset, but outside of a group (because Sum doesn't work properly in groups that have subgroups). For example:
=Sum(IIf(Fields!ProductType.Value = "unicorns", Fields!Qty.Value, 0))
[rsAggregateOfMixedDataTypes] The Value expression for the textrun uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type.
And it's caused by the Qty field being a type that is different to the 0; so you should usually just use Nothing instead.
=Sum(IIf(Fields!ProductType.Value = "unicorns", Fields!Qty.Value, Nothing))
But what I really wanted to talk about today was that I came across a case where "unicorns" wasn't working as a criteria, because the case was wrong. But wait, isn't both SQL Server and SSRS by default case insensitive?
Oddly, it appears that SSRS is case insensitive for fields based on nvarchar and varchar strings, but case sensitive for fields that are char or nchar. Weird, and my searches didn't come up with any sources that could confirm that was the case: it just seems to be what I've come across today.