This is a migrated thread and some comments may be shown as answers.

An Item with the same key has already been added

1 Answer 316 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Laura
Top achievements
Rank 1
Laura asked on 17 Sep 2012, 08:18 PM
We are using Telerik Report Viewer in our Web Application. During development and testing on my local machine I all of a sudden began receiving this bug while testing. Any thoughts?

An item with the same key has already been added.

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Telerik.Reporting.Processing.Expressions.ReportExpressionContext.ResolveNameSpaces()
at Telerik.Reporting.Processing.Expressions.ReportExpressionContext..ctor(Type methodInfoSourceType)
at Telerik.Reporting.Processing.ParametersManager`1..ctor(IReportDocument definition, ICollection`1 parameters)
at Telerik.ReportViewer.WebForms.ParametersPage.get_ParamsManager()
at Telerik.ReportViewer.WebForms.ParametersPage.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at Telerik.ReportViewer.WebForms.ParametersPage.OnPreLoad(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 19 Sep 2012, 09:05 AM
Hi Wenlei,

Our first guess would be that the same object (report parameter) is added twice. Check the report parameter collection for duplicates. 
However, we cannot tell for sure, from the stack trace alone, so if you cannot find the culprit, please open a support ticket and attach a runnable project that exhibits the problem.

Regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Laura
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or