This project has moved. For the latest updates, please go here.
1

Closed

Stack Overflow Error

description

I have created a new project for creating reports. There is no error while accessing the report from a console project, but while referencing the same to a MVC 4 project , while generating report, it says stack overflow error. The same problem exists while testing your sample from the same site. Is there any changes to be made while generating report for asp.net mvc projects?
Closed Sep 2, 2014 at 9:05 PM by VahidN

comments

VahidN wrote Mar 15, 2013 at 4:32 PM

Hello,
Which sample does generate stack overflow? There was an issue with Entity frame work and its dynamic proxies. It's fixed in v1.8.
Please provide or attach your not working sample here.

VahidN wrote Mar 18, 2013 at 7:50 PM

I added a new ASP.NET MVC4 sample which uses EF Code first and PdfReport. Download it from here.

serenians wrote Mar 19, 2013 at 5:58 PM

Thanks for your quick update. And it works very much fine , thank you..
And nice work ..

serenians wrote Mar 22, 2013 at 10:25 AM

Thanks vahid for your solution but while using EF along with Charting i 'm obtaining an error:
Series data points do not support values of type System.Data.Entity.DynamicProxies.Region_AA949B4C897513D6EA4A08A74EC85880EF66FE6A59867B582647C1C686BF92AA only values of these types can be used: Double, Decimal, Single, int, long, uint, ulong, String, DateTime, short, ushort.
I'm using an object inside a obtained result to plot the chart and is stating the above error. How can i solve this.

serenians wrote Mar 22, 2013 at 10:27 AM

And if you need the stack trace:
[ArgumentException: Series data points do not support values of type System.Data.Entity.DynamicProxies.Region_AA949B4C897513D6EA4A08A74EC85880EF66FE6A59867B582647C1C686BF92AA only values of these types can be used: Double, Decimal, Single, int, long, uint, ulong, String, DateTime, short, ushort.]
   System.Windows.Forms.DataVisualization.Charting.Series.CheckSupportedTypes(Type type) +1438893
   System.Windows.Forms.DataVisualization.Charting.DataPoint.SetValueXY(Object xValue, Object[] yValue) +81
   System.Windows.Forms.DataVisualization.Charting.DataPointCollection.AddXY(Object xValue, Object[] yValue) +450
   UGC.EMIS.Reporting.ChartImage.MSChartHelper.AddXY(Object xValue, Object[] yValue) in E:\!!!IMPORTANT!!!! Running Projects By Sagar\UGCEMIS\UGC.EMIS.UI\UGC.EMIS.Reporting\ChartImage\MSChartHelper.cs:60
   UGC.EMIS.Reporting.<>c__DisplayClass24.<CreatePdfReport>b__10(EventsArguments args) in E:\!!!IMPORTANT!!!! Running Projects By Sagar\UGCEMIS\UGC.EMIS.UI\UGC.EMIS.Reporting\ChartImage\ChartImagePdfReport.cs:91
   PdfRpt.Core.PdfTable.RowsManager.addSingleRow(IList`1 row) +427
   PdfRpt.Core.PdfTable.RowsManager.printNormalTable() +125
   PdfRpt.Core.PdfTable.RowsManager.AddMainTableRows() +255
   PdfRpt.Core.PdfTable.RenderMainTable.AddToDocument() +24
   PdfRpt.PdfReportDocument.addMainTable() +88
   PdfRpt.PdfReportDocument.createPdf() +295
   PdfRpt.PdfReportDocument.<runInReleaseMode>b__0(Document pdfDisposable) +15
   PdfRpt.Core.Helper.Guard.SafeUsingBlock(TDisposable disposable, Action`1 action, Func`2 unwrapper) +165
   PdfRpt.Core.Helper.Guard.SafeUsingBlock(TDisposable disposable, Action`1 action) +126
   PdfRpt.PdfReportDocument.runInReleaseMode() +247
   PdfRpt.PdfReportDocument.GeneratePdf(Boolean debugMode) +45
   PdfRpt.FluentInterface.PdfReport.Generate(Action`1 pdfRptFileBuilder, Boolean debugMode) +91
   UGC.EMIS.Reporting.ChartImagePdfReport.CreatePdfReport() in E:\!!!IMPORTANT!!!! Running Projects By Sagar\UGCEMIS\UGC.EMIS.UI\UGC.EMIS.Reporting\ChartImage\ChartImagePdfReport.cs:28
   UGC.EMIS.UI.Areas.Reports.Controllers.TestPdfReportController.Index() in E:\!!!IMPORTANT!!!! Running Projects By Sagar\UGCEMIS\UGC.EMIS.UI\UGC.EMIS.UI\Areas\Reports\Controllers\TestPdfReportController.cs:31
   lambda_method(Closure , ControllerBase , Object[] ) +62
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +205
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +50
   System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +237
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +237
   System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +50
   System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +126
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +45
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +61
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +49
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +28
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +49
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8968077
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

VahidN wrote Mar 22, 2013 at 12:17 PM

Do not pass an object to the AddXY method here.
Extract its X and Y values and cast them to one of the following types directly, before using them:
Double, Decimal, Single, int, long, uint, ulong, String, DateTime, short, ushort

wrote Sep 2, 2014 at 9:05 PM