Belmiris
Belmiris

Reputation: 2805

Duplicate dataset etc. error in rdlc report

I keep getting an unhelpful error while trying to create a subreport using Visual Studio 2005. The error is:

More than one data set, data region, or grouping in the report has the name ‘Factor_StoreTrak_StoreTrakEntities_POS_PollingResultsDetailDTO’. Data set, data region, and grouping names must be unique within a report. C:\Development\WindowsApps\ReportTesting\Reports\PollingResultsSubreport.rdlc

Now, I keep having the report partially done and compiling and running just fine but when I add a new column or somehow change it I suddenly get this error. I then delete every control off my report one by one trying to recompile after each deletion and this error is always thrown. I delete the report and start from scratch only to have it happen again at some random point.

Upvotes: 2

Views: 1871

Answers (2)

In my case the problem was that when I inserted a row group, it gave it the name "matrix1_RowGroup4", even though there already was a "matrix1_RowGroup4" in the report. It this complained, "More than one data set, data region, or grouping in the report has the name 'matrix1_RowGroup4'."

What I did to solve it was:

Opened the XML file ([myreportname].rdl) - I didn't do it in Notepad, but in the Visual Studio IDE. 

Searched for "matrix1_RowGroup4"; as indicated by the err msg, there were two

Incremented the name of the second/newer one to "matrix1_RowGroup5"

Naturally, SSRS being what it is, the Preview still wouldn't display at first for some bogus reason (dataset couldn't be found or some such); I went to the Data tab, and refreshed the fields, and then it was okay.

Upvotes: 0

Belmiris
Belmiris

Reputation: 2805

If you need to change the report after the referenced assembly is recompiled / versioned, just open the rdlc file (report file) with Notepad.exe (see that is just an XML file), find the DataSets section and simply delete the older data set, save the changes and reopen the report in the IDE. If the new dataset is not yet in the file, simply drag a field from the datasources panel onto your report somewhere, this will create a new dataset in the report.

Upvotes: 1

Related Questions