Hi,
I receiving following exception once I try to print the charts or do print preview.
attached please find the code.
we are using Syncfusion version 3.201.1.0 in the Windows XP environment with .NET 2003.
************************************************
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Styles.StyleInfoStore.HasValue(StyleInfoProperty sip)
at Syncfusion.Styles.StyleInfoIdentityBase.GetBaseStyle(IStyleInfo thisStyleInfo, StyleInfoProperty sip)
at Syncfusion.Styles.StyleInfoSubObjectBase.IntGetDefaultStyleInfo(StyleInfoProperty sip)
at Syncfusion.Styles.StyleInfoBase.GetDefaultStyleInfoStore(StyleInfoProperty sip)
at Syncfusion.Styles.StyleInfoBase.GetValue(StyleInfoProperty sip)
at Syncfusion.Windows.Forms.Chart.ChartSymbolInfo.get_Shape()
at Syncfusion.Windows.Forms.Chart.ChartSeriesRenderer.RenderAdornments(Graphics g)
at Syncfusion.Windows.Forms.Chart.ChartSeriesCollection.DrawSeries(Graphics g, IChartAreaHost chart)
at Syncfusion.Windows.Forms.Chart.ChartArea.Draw(PaintEventArgs e)
at Syncfusion.Windows.Forms.Chart.ChartControl._Paint(Graphics g)
at Syncfusion.Windows.Forms.Chart.ChartControl.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
*************************************************
I have 4 chart controls in this user control.
when I fire print event for all the 4 charts one after an other at the same time on the print button click. Printer prints all the charts. after that Chart Profitability map fails everytime. (Check Print IV chart method)
I receive the same exception if I try to print preview the chart. chart displays in the print preview window but as soon as you close the window chart fails.
the solution I found for the print preview is to hide the chart and then do the print preview and then show the chart. it works fine. but even this didn''t work with print.
I have tried alot but couldn''t find any solution why is this failing.
Looing for any help.
Thanks.
Pankaj
forms.zip