I have a report with a map component that when I try to add a tablix to it, generates this error.
It previously had two tablix components on it that worked fine until I went to re-configure one of the tablix to not call a subreport and instead produce a databar on it's own (because the subreport ended up querying the database hundreds of times).
BIDS would give an error when trying to pick the values for that databar, saying that the values had to be in the dataset that the tablix was using (though it clearly was since it was in the list of items to pick when configuring the databar). If I tried to configure the series group selecting one of the items from the list it would crash.
I deleted those tablix entirely (after BIDS crashed 5 or 6 times) and now I get the error from the title, and cannot add a tablix to this report at all. I suspect something in the report definition is corrupt, but I don't see anything out of the ordinary in the rdl. Is the report salvagable? Does anyone happen to know what 'key' it's refering to?? The word key does not occur in the RDL anywhere.
I would just re-create the report from scratch, but there are other aspects of it that have taken 4-5 days to develop that I can't just throw away.
I have run into this issue again with another report. This report has the map component as the main part of the report, and when I go to add a table to the report I get the same error. I've found that when I go to add other items to the report I get different errors. I get 'Object reference not set to instance of an object' when I try to add:
I get 'An item with the same key has already been added' if I add:
Other items appear to work.
Further to my previous email... I can now re-create the problem every time. I set up a report from scratch. First add a map and hook it up to an SQL spatial data source. Then add a table and hook it up to a data source. Preview the report. Close the report, copy and paste the rdl file to a new rdl file within visual studio. Open the new file and try to add a table... the error will occur.
As far as I can tell it only occurs when you use a SQL spatial data source.
And I believe I have finally found the source of this problem. There were two layers in the map based on two different datasets, but the field names in each of the data sets were the same. I wouldn't have thought that this would have been a problem since they're two different data sets, but maybe that changes when they're used in the same component (the map)?
It means that if you have two attributes with same name but from different tables, you should rename it,as SSRS will think the attributes are the same,
you should alias it:
Product.ownerid as OwneA
Item.ownerid as OwnerB
- Proposed as answer by Ursa Pangos Thursday, May 12, 2011 11:40 AM
Microsoft said in early 2011 that they had included a fix in the one of the more recent cumulative update packs (6 or 7). I haven't tested it myself, as we spent more time than we ever wanted to on troubleshooting with MS and in the end dropped any project we had that was using their RS map component.
I'd strongly advise against using it in anything more than a trivial report, my experience has been that it does not appear to be in any way mature or well supported.
Ursa Pangos is correct. I had also faced the issue. Egs: I tried to fetch field with name AccountNum from two tables in a data set. Then the system threw this error. Later I gave a different label to one of the field and the issue was resolved.
- Edited by Sreekanth KV Wednesday, October 23, 2013 1:28 PM Spelling mistake