Sql-server – SSRS Error – “Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate

reporting-servicessql serversql-server-2016

I'm new to SSRS and I'm not sure if it will do what I would like to do.

I'm getting the following error in SSRS:

"The Value expression for the text box 'Textbox17' refers to the field 'DayCnt'. Report item expressions can only refer to fields withing the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case."

I have a list that's 3 rows and 3 columns. I need to use multiple data sets across the rows and columns. I would like everything on the report to be grouped on the school ID, which each dataset does have.

I will be using multiple datasets per cell in some cases and I'm using a textbox and then dragging the dataset field into it. I'm not sure if grouping is the problem. I'm not sure how to group the entire list at once, or if it is row based, or how the grouping works with a list with multiple columns.

How can I get everything in the list to be based off of the school ID?

Thank you for your help.

enter image description here

Best Answer

You cannot use different datasets on only one SSRS table. One table should only refer to one dataset.

And the solution to your question is: recreate your dataset (query), try to get one dataset by using distributed query if they are on different server instance, or specify database name when they are on the same server.

Related Topic