W.D Posted July 21, 2008 Report Share Posted July 21, 2008 Hi, I'm developing windows based application to create and export a large number of charts to JPEG image stream and then write to database. I found after a few successful export, I will get the error message "Object reference not set to an instance of an object" when the code executed to the line of " SoftwareFX.ChartFX.Internet.Server.Chart thisChart=new SoftwareFX.ChartFX.Internet.Server.Chart();". My sample code is below. My application in windows based, but I used SoftwareFX.ChartFX.Intenet.Server.Chart because I want to use the Export method to export JPEG image. I create the chart in memory. But even though I called thisChart.Dispose() and thisChart==null. I still keep getting this error. Please help. ********************************************************** for (int i=0; i<100; i++) { using (SoftwareFX.ChartFX.Internet.Server.Chart thisChart=new SoftwareFX.ChartFX.Internet.Server.Chart()) { System.IO.MemoryStream ms=new System.IO.MemoryStream(); thisChart.Export(SoftwareFX.ChartFX.Internet.Server.FileFormat.Jpeg, ms); } } Regards, W.D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.