Blog Post

#SSRS error – An item with the same key has already been added

,

Here is a simple yet annoying error I ran into while creating a dataset. Below is the query that I was using and it would run just fine when executed from management studio.

SELECT
CalendarYear Yr
, CalendarMonthNum Mth
, CalendarMonthName Mth
FROM
dbo.Orders o

But SSRS doesn’t like those two columns with the same name “Mth” resulting in the error “an item with the same key has already been added”.
To resolve this simply make sure that no two columns in your dataset have the same name.

~Sam

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating