Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS returned data type not valid for the aggregate function

I am making a SSRS, when executing the query

SELECT Brand.[KeyOffer],
   COALESCE(SUM([Key Offer].Revenue),0) as Revenue
FROM [Brand Key Offer] Brand
LEFT JOIN [Key Offer] ON Brand.Keyoffer = [Key Offer].[Key Offer] AND [Key Offer].[Date] = '7/05/2017'
WHERE Brand.[Brand] = 'SMART'
GROUP BY [Brand].[KeyOffer]
ORDER BY [Revenue] DESC

But when I preview the reprot, I get this warning message.

Warning     [rsAggregateOfInvalidExpressionDataType] The Value expression for the textrun ‘Textbox21.Paragraphs[0].TextRuns[0]’ uses an aggregate function with an expression that returned a data type not valid for the aggregate function.       c:\users\t-aordiz\documents\visual studio 2015\Projects\TelemarketingRS\TelemarketingRS\Telemarketing Revenue.rdl   0   

Ive been to a lot of topics but cant seem to find a way to solve this problem.

like image 333
Vian Ojeda Garcia Avatar asked Jul 06 '17 01:07

Vian Ojeda Garcia


1 Answers

The same happened to me when I tried to change an output's datatype from datetime to varchar.

Try to delete the file YourReportFile.rdl.data and preview again. It worked for me in VS2015.

like image 141
Nopadol S. Avatar answered Nov 15 '22 09:11

Nopadol S.