question

fozzy767 avatar image
fozzy767 asked

How to fix a report textbox aggregate expression error in SQL server reporting with multiple datasets?

I have a SQL Server Reporting Services report that has a textbox within a Report with variations of the following expression =Sum(IiF(Fields!RegisterID.Value = 6000, 1, 0) and Iif(Fields!PointID.Value = 500, 1, 0)) / Sum(Iif(Fields!PointID.Value = 500, 1, 0)) I see the following error when I try to preview the report: The Value expression for the text box ‘Textbox2’ uses an aggregate expression without a scope. A scope is required for all aggregates used outside of a data region unless the report contains exactly one dataset. What am I missing in this this expression to make it run incorrectly
reporting-services
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Venkataraman avatar image
Venkataraman answered
Refer to the forum post: http://stackoverflow.com/questions/14267848/ssrs-multiple-dataset-errors As you are having multiple data sets, report does not know the scope to apply the aggregation.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.