Chart.ToImage - Object Reference Error

I've run into another problem with the Chart.ToImage method. I'm modifying a chart that is embeded into a PowerPoint slide as an OLE object (for more details visit here). Everything is working properly now with the version 4.4.3.12 of the dlls except for if any of the series contains entirely null data I receive an object reference error in the ToImage method. In contrast excel/powerpoint handles this correctly by only drawing the series that contains data or by drawing an empty chart. Please see the attached file and attempt to access the chart and call ToImage and you should receive an object reference error. Any help would be appreciated.

Hi,

Could you try the attached version (4.4.3.15) and give us your feedback.

Thank you.

Hi,

Please ignore Amjad's post.

Please try this fix. We have fixed this bug.

Sorry for the delay on this. (I was on vacation) I'm now getting the exception when using the same function using the similar workbok. (It had data in the first data set but not the last two)

Value cannot be null.
Parameter name: encoder

Edit: This seems to only happen when I use ToImage(stream,System.Drawing.Imaging.ImageFormat.Exif) I switched to EMF and it is OK.

Hi,

.exif format is not supported now.

The following formats are supported:

.bmp, .gif, .jpg, .jpeg, .tiff, .emf

Bad news on this front. I've found that this new dll prevents smart makers from being processed. I'm using the following code that works properly with the latest full-download available from your site (4.4.3.1) and does not work when I use the new dll provided here (4.4.3.15). Has something changed that I should be aware of?

//Set the License

Aspose.Cells.License lic = new Aspose.Cells.License();

lic.SetLicense(context.Server.MapPath("~/Licenses/Aspose.Total.Lic"));

WorkbookDesigner report = new WorkbookDesigner();

report.Open(context.Server.MapPath("~/Templates/" + templateFilename));

//Bind data for smart markers and process the smart markers

report.SetDataSource(dsSLX);

report.Process(debug);

Hi,

Could you create a sample test project / application and send us here to reproduce the issue.

By the way, could you try the attached version, I tested it and processed smart markers in the template file and it works fine for me.

Thank you.

I’ve attached a simple little application. It doesn’t work with 4.3.3.17 but it does if you replace the reference with 4.3.3.1.

Hi,

Please try this fix.

The fix seems to correct both of my issues properly. Thanks for the quick response (as always).