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

Report book exception

3 Answers 170 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
chadan
Top achievements
Rank 1
chadan asked on 10 Sep 2015, 06:29 PM

Getting exception after adding new report in report book

 

{"message":"","exceptionMessage":"Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index","exceptionType":"Telerik.Reporting.Services.Engine.DocumentRenderException","stackTrace":"   at Telerik.Reporting.Services.Engine.Document.GetDocumentInfo()\r\n   at Telerik.Reporting.Services.Engine.ReportEngine.GetDocumentInfo(String clientID, String instanceID, String documentID)\r\n   at Telerik.Reporting.Services.WebApi.ReportsControllerBase.GetDocumentInfo(String clientID, String instanceID, String documentID)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"}

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 12 Sep 2015, 02:53 PM
Hello Chadan,

Most probably you are trying to create a Reportbook object dynamically based on arguments not passed to the ReportBook constructors. Please check the suggestions in my post in the ReportBook get parameters from request forum thread.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
chadan
Top achievements
Rank 1
answered on 15 Sep 2015, 10:33 AM

Hello Stef,

We have designed reports in visual studio. We created a class which is inherited from ReportBook class.

Whenever we try to add new report object in report item collection of report book, it throws an exception of 'Internal Server Error
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index'. Plz suggest something about this issue.

Best Regards,

Chandan

 

 

0
Stef
Telerik team
answered on 17 Sep 2015, 12:45 PM
Hi Chandan,

Note that the default report resolvers work with TRDX files and reports created in VS where the reporting engine instantiates them through their default constructors. In case the ReportBook uses a parameterized constructor, you will have to use a custom resolver to instantiate it.

In order to investigate further the problem, please post the code for creating the ReportBook, and how the viewer is configured to request the ReportBook.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
chadan
Top achievements
Rank 1
Answers by
Stef
Telerik team
chadan
Top achievements
Rank 1
Share this question
or