How to Resolve a Case of "The tablix 'xyz' contains an invalid DataSetName in SSRS? I am getting the following stubborn error in an SSRS 2012 report:

Deploying report 'abc'.
Warning : The tablix 'xyz' contains an invalid DataSetName (Expected: ‘DataSet1’; Actual: ‘DataSet2’). The DataSetName of the inner data region or group must be the same as the DataSetName of the outer scope, unless a relationship is specified on the inner scope or on the dataset.


When looking through the visual studio GUI, the dataset name is correct, so the GUI shows nothing that would merit this warning. What is the best way to resolve this?
I found a solution, so am posting for others to benefit.

The tablix receiving the warning was a tablix nested inside of another tablix. I had checked and rechecked that nested tablix, and nothing in the Visual Studio GUI was amiss. It was reporting the correct dataset.

Finally I resorted to opening up an XML editor and opened the RDL file, and sure enough, the XML file had the wrong dataset in the XML.

It was in the definition of the tablix, at this point:

&lt;DataSetName&gt;DataSet2&lt;/DataSetName&gt;
&lt;Left&gt;0.74in&lt;/Left&gt;
&lt;Height&gt;0.875in&lt;/Height&gt;
&lt;Width&gt;5.64866in&lt;/Width&gt;
&lt;Style&gt;
  &lt;Border&gt;
    &lt;Color&gt;LightGrey&lt;/Color&gt;
    &lt;Style&gt;Solid&lt;/Style&gt;
  &lt;/Border&gt;
&lt;/Style&gt;


The solution was to delete the

&lt;DataSetName&gt;DataSet2&lt;/DataSetName&gt; 


line from the XML entirely, because a nested tablix should not specify a dataset name, because by definition a nested tablix must use the dataset from the outer tablix.

The reason why this warning had come about was because originally I created the tablix as a standalone tablix, so it did have a dataset. After some report changes, I copied and pasted the tablix into another tablix. At that point, apparently, visual studio kept the dataset name in the paste, but did not support changing it from the GUI.