Error on Deployment of SQL server 2008 R2 reports to SQL Server 2008, Aggregate functions cannot be nested inside other aggregate functions
I have used SQL Server 2008 R2 for developing my reports, and when I tried to deploy it on hosting server which is SQL server 2008 it displayed an error while deploying a report,
Error
The Value expression for the textrun 'Textbox36.Paragraphs[0].TextRuns[0]' contains an aggregate function (or RunningValue or RowNumber functions) in the argument to another aggregate function (or RunningValue). Aggregate functions cannot be nested inside other aggregate functions.
I think following expression is throwing error while deploying from sql server 2008R2 to sql server 2008
Expression
=Sum(IIF(Fields!RegisteredOn.Value >Parameters!FromDate.Value and Fields!RegisteredOn.Value < Paramet开发者_Python百科ers!EndDate.Value , 1,0))
Is there any workaround for this in SQL server 2008
You could try replacing the IIF with CASE. I am not sure that IIF is available in all versions of SQL Server.
http://msdn.microsoft.com/en-us/library/ms181765.aspx --See C. Using CASE to replace the IIf function that is used in Microsoft Access --
精彩评论