I am trying to load a simple report in a asp.net mvc web application using TypeReportSource.
But it shows "Internal Server Error: Value cannot be null. Parameter name: key" while making request to the following url
http://localhost:47829/api/reportsApi/clients/154917-9738/instances/154821-14b1/documents/154821-7d50154821-9a39/info
The response:
{"message":"","exceptionMessage":"Value cannot be null.\r\nParameter name: key","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.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.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.Web.Http.Controllers.ExceptionFilterResult.<
ExecuteAsync
>d__0.MoveNext()"}
how to resolve this error? same report is working perfectly with wpf application.
Telerik Reporting version Q1 2015 SP1.
Thanks
9 Answers, 1 is accepted
Please check the samples in the TypeReportSource Class page and make sure that you are configuring the report source properly. In case the issue persists we will need to review a runnable sample project exhibiting the issue. You can also post the code used in the report viewer view and the reports controller, which might give us some insight on the issue.
Regards,
Nasko
Telerik
See What's Next in App Development. Register for TelerikNEXT.
Hello Nasko,
Downgrading from Q1 2015 SP1 to Q1 2015 solved the problem. There was a parameter type mismatch. Version Q1 2015 SP1 is unable to detect the problem but Q1 2015 does(instead of throwing Internal Server Error).
Thanks
Hi,
I got the same error message when trying to load reports in my MVC app, after upgrading from "Reporting Q2 2014" to "Reporting Q1 2015 SP1". I got the same message, exception type (Telerik.Reporting.Services.Engine.DocumentRenderException), and stacktrace posted by Rased.
Additionaly, I have found in output window on Visual Studio this exception:
*** RenderReport #0 STARTED ***
An error has occurred while rendering the report: System.ArgumentNullException: Valor não pode ser nulo.
Nome do parâmetro: key
em System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
em System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
em Telerik.Reporting.Html5Rendering.Writers.Html.ImageWriter.WritePredefinedImage(IImageContainer imageContainer)
em Telerik.Reporting.Html5Rendering.RenderingContext.WritePredefinedImage(IImageContainer imageContainer)
em Telerik.Reporting.Html5Rendering.Writers.Html.PictureBox.Begin(LayoutElement element, ElementPageInfo info)
em Telerik.Reporting.Html5Rendering.Writers.Report.WriteStartElement(LayoutElement element, ElementPageInfo pageInfo)
em Telerik.Reporting.BaseRendering.PageHandler.Telerik.Reporting.Paging.IPageHandler.StartElement(LayoutElement element, ElementPageInfo info)
em Telerik.Reporting.Paging.PageStartElement.AddToPage(IPageHandler handler)
em Telerik.Reporting.Paging.PageElementLayer.AddToPage(IPageHandler handler)
em Telerik.Reporting.Paging.PageElementManager.AddToPage(IPageHandler handler)
em Telerik.Reporting.Paging.PageCompositionBase.AddElementsToPage()
em Telerik.Reporting.Paging.PageCompositionBase.SendPhysicalPages()
em Telerik.Reporting.Paging.PageCompositionBase.OutputPage()
em Telerik.Reporting.Paging.PageCompositionBase.CreatePages()
em Telerik.Reporting.Paging.PagerBase.Telerik.Reporting.Paging.IPager.CreatePages(IPageHandler handler, Report report)
em Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback)
Then, I realised that the error was occurring on a image rendering in the report.
In this report I have a Telerik.Reporting.PictureBox; the "Value" property of this picturebox points to a System.Drawing.Image property from the report DataSource; and this exception ocurs when this Image property is null.
I left this image property null when I want to show no image on report, and this was working in Q2 2014, so I guess this is a bug in Telerik image rendering implementation on Q1 2015 SP1.
You are correct about the issue in the Q1 2015 SP1 version of Telerik Reporting. The described behavior is a known issue in Q1 2015 SP1 which is exhibited when you use a PictureBox item with an expression which cannot be evaluated to a valid image, or is without a value/has a null value.
The issue has been fixed in the latest available Telerik Reporting internal build - 9.0.15.422 (download link). Please download and install the internal build to resolve the issue.
Regards,
Nasko
Telerik
See What's Next in App Development. Register for TelerikNEXT.
Hello Nacho
Your upgrade works !
Please can you ask on your crew, cause it's the top ten for each control telerik,
To accept null or empty value in the variable or property. (treeview, dropdown ....)
StringIsEmptyOrNull on the paperboard, cause i search several day, it's cost me a lot.
thanks For your help.
Regarding the Telerik Reporting Report Parameters you can enable null and empty values by setting the AllowNull and AllowBlank properties of the parameter to ​​True​.
Regards,
Nasko
Telerik
Hello Nasko,
Thanks , i know it.
It was a about the bug , in several case (control), the telerik's team don't take serious, about null value and empty value.
i say all time, but nobody want to understand , for example treewiew, the root node, can be null value or Zero value for the parent id.
it' was my private joke ! cause i m fighting to understand waht my report don't want work normaly.
Sorry if i borrow you.
Olivier,