#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

Advertisements

One thought on “#SSRS error – An item with the same key has already been added

  1. Pingback: Why doesn’t my gauge show correct values? « Sam Vanga's

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s