Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • The following code worked well in previous versions but now

                                    var _genericReport = new XtraReport1();

                                    var xrChart = new XRChart();

                                    xrChart.WidthF = 1130;
                                    xrChart.HeightF = 550;
                                    xrChart.DataSource = _dataTable;
                                    xrChart.SeriesTemplate.View = new SwiftPlotSeriesView();
                                    xrChart.SeriesDataMember = _dataTable.Columns[1].ColumnName;
                                    xrChart.SeriesTemplate.ArgumentDataMember = _dataTable.Columns[0].ColumnName;
                                    xrChart.SeriesTemplate.ValueDataMembers.AddRange(new string[] { _dataTable.Columns[2].ColumnName });


                                    _genericReport.Bands["Detail"].Controls.Add(xrChart1);

                                    printControl1.PrintingSystem = _genericReport.PrintingSystem;
                                    _genericReport.CreateDocument();//Here throw NullReferenceException

                                    The stacktrace:
                                    at DevExpress.XtraCharts.XYDiagram2D.CalculateIndicators(DiagramInfo diagramInfo)
                                    at DevExpress.XtraCharts.XYDiagram2D.UpdateDiagramInfoInternal(DiagramInfo diagramInfo, Boolean updateSeriesPoints)
                                    at DevExpress.XtraCharts.Diagram.UpdateDiagramInfo(Boolean updateSeriesPoints)
                                    at DevExpress.XtraCharts.Native.SeriesPointUpdateBehaviour.PerformUpdate(SeriesPointUpdateCommand updateCommand)
                                    at DevExpress.XtraCharts.Native.SeriesPointUpdateBehaviour.Add(ISeriesPoint[] points)
                                    at DevExpress.XtraCharts.SeriesPointCollection.Add(SeriesPoint point)
                                    at DevExpress.XtraCharts.Series.DevExpress.Charts.Native.ISeries.AddSeriesPoint(ISeriesPoint point)
                                    at DevExpress.Charts.Native.SimpleChartBindingProcedure.PerformPointBinding(Object argument, Object dataRow, ISeries series)
                                    at DevExpress.Charts.Native.ChartBindingProcedure.CreateBindingSeries(ISeriesTemplate seriesTemplate, String seriesDataMember, SortMode sorting, String seriesNameBeginText, String seriesNameEndText)
                                    at DevExpress.XtraCharts.Native.Chart.GetActualAutocreatedSeries()
                                    at DevExpress.XtraCharts.Native.Chart.GetAutocreatedSeries()
                                    at DevExpress.XtraCharts.Native.Chart.UpdateAutocreatedSeries()
                                    at DevExpress.XtraCharts.Native.Chart.Update(ChartUpdateType updateType)
                                    at DevExpress.XtraCharts.Native.Chart.RefreshDataInternal(Boolean forceRefresh)
                                    at DevExpress.XtraCharts.Native.Chart.RefreshData(Boolean forceRefresh)
                                    at DevExpress.XtraReports.UI.XRChart.UpdateBindingCore(XRDataContext dataContext, ImagesContainer images)
                                    at DevExpress.XtraReports.UI.XRControl.UpdateBinding(XRDataContext dataContext, ImagesContainer images)
                                    at DevExpress.XtraReports.UI.Band.GenerateContent(DocumentBand docBand, Int32 rowIndex, Boolean fireBeforePrint)
                                    at DevExpress.XtraReports.UI.Band.GenerateWithSubreports(DocumentBand docBand, Int32 rowIndex, Boolean fireBeforePrint, PageBuildInfo pageBuildInfo)
                                    at DevExpress.XtraReports.Native.SelfGeneratedDocumentBand..ctor(RootDocumentBand root, DocumentBandKind kind, Band band, Int32 rowIndex, Boolean fireBeforePrint, PageBuildInfo pageBuildInfo)
                                    at DevExpress.XtraReports.UI.Band.CreateDocumentBand(Int32 rowIndex, RootDocumentBand rootDocBand, PageBuildInfo pageBuildInfo)
                                    at DevExpress.XtraReports.UI.DetailBand.CreateDocumentBand(Int32 rowIndex, Int32 rowCount, RootDocumentBand rootDocBand, PageBuildInfo pageBuildInfo)
                                    at DevExpress.XtraReports.Native.Printing.DetailWriterBase.WriteDetailCore(PageBuildInfo pageBuildInfo)
                                    at DevExpress.XtraReports.Native.Printing.DetailWriterBase.Write(DocumentBand rootBand, PageBuildInfo pageBuildInfo)
                                    at DevExpress.XtraReports.Native.Printing.DocumentBuilder.GetBand(DocumentBand rootBand, PageBuildInfo pageBuildInfo)
                                    at DevExpress.XtraPrinting.Native.DocumentBand.GetBand(Int32 index, RectangleF bounds, PointF offset, Boolean forNextPage)
                                    at DevExpress.XtraPrinting.Native.DocumentBand.GetBand(Int32 index)
                                    at DevExpress.XtraPrinting.Native.BuildInfoContainer.GetDetailContainer(DocumentBand rootBand, PageRowBuilderBase pageRowBuilderBase, RectangleF bounds)
                                    at DevExpress.XtraPrinting.Native.PageHeaderFooterRowBuilder.GetHeaderRowIndex(DocumentBand rootBand)
                                    at DevExpress.XtraPrinting.Native.PageHeaderFooterRowBuilderBase.FillPageHeader(DocumentBand rootBand, RectangleF bounds)
                                    at DevExpress.XtraPrinting.Native.PageHeaderFooterRowBuilderBase.FillReportDetailsAndFooter(DocumentBand rootBand, RectangleF bounds)
                                    at DevExpress.XtraPrinting.Native.PageRowBuilderBase.FillPage(DocumentBand rootBand, RectangleF bounds)
                                    at DevExpress.XtraPrinting.Native.PageBuildEngine.Build()
                                    at DevExpress.XtraPrinting.Native.PageBuildEngine.BuildPages(DocumentBand rootBand, Boolean clearGroupingInfo)
                                    at DevExpress.XtraPrinting.Native.DocumentHelper.BuildPagesCore()
                                    at DevExpress.XtraPrinting.Native.DocumentHelper.BuildPages()
                                    at DevExpress.XtraPrinting.Native.PrintingDocument.BuildPages()
                                    at DevExpress.XtraPrinting.Native.PrintingDocument.End(Boolean buildPagesInBackground)
                                    at DevExpress.XtraPrinting.PrintingSystemBase.End(Boolean buildPagesInBackground)
                                    at DevExpress.XtraReports.UI.XtraReport.CreateDocumentCore2(PrintingSystemBase ps, Single progressRange, Boolean buildPagesInBackground)
                                    at DevExpress.XtraReports.UI.XtraReport.CreateDocumentCore(Single progressRange, Boolean buildPagesInBackground)
                                    at DevExpress.XtraReports.UI.XtraReport.CreateDocument(Single progressRange, Boolean buildPagesInBackground, Boolean suppressClearDataContext)
                                    at DevExpress.XtraReports.UI.XtraReport.CreateDocument(Boolean buildPagesInBackground)
                                    at DevExpress.XtraReports.UI.XtraReport.CreateDocument()
                                    at WindowsFormsApplication2.Form1.button1_Click(Object sender, EventArgs e) in c:\Users\dmassimiani\Documents\Visual Studio 2012\WindowsFormsApplication2\WindowsFormsApplication2\Form1.cs:line 85
                                    at System.Windows.Forms.Control.OnClick(EventArgs e)
                                    at System.Windows.Forms.Button.OnClick(EventArgs e)
                                    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
                                    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
                                    at System.Windows.Forms.Control.WndProc(Message& m)
                                    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
                                    at System.Windows.Forms.Button.WndProc(Message& m)
                                    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
                                    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
                                    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
                                    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
                                    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
                                    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
                                    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
                                    at System.Windows.Forms.Application.Run(Form mainForm)
                                    at WindowsFormsApplication2.Program.Main() in c:\Users\dmassimiani\Documents\Visual Studio 2012\WindowsFormsApplication2\WindowsFormsApplication2\Program.cs:line 19
                                    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
                                    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
                                    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
                                    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
                                    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                                    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                                    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
                                    at System.Threading.ThreadHelper.ThreadStart()

                                You must  log in  or  register  to leave comments

                                1 Solution

                                0

                                Hi Diego,

                                Thank you for your message. This problem has been already discussed and fixed in our Support Center. Please refer to the After running DXperience 12.2 project converter on previously working project, report constructors throw NullReferenceException in DevExpress.XtraCharts.XYDiagram2D.CalculateIndicators report for additional information.
                                This fix will be applied in the next build of our components. If it is urgent, I invite you to obtain a Public Fix from the original issue's page.

                                You must  log in  or  register  to leave comments

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners