Am getting below exception error while trying to load a byte array to the report. Please let me know how can I resolve the problem. Appreciate a help
Exception Error
An unhandled exception of type 'System.IO.InvalidDataException' occurred in Stimulsoft.Report.dll
Additional information: The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.
Here is the code snippet am using..
System.Windows.UIElement element = (System.Windows.UIElement)this.ImageCanvas.cadImage; (P.S : this is an image)
buffer = element.ToBitmap(15, 15).ToPNGBytes();
StiReport report = new StiReport();
report.Load(buffer);
report.ShowWithWpf();
getting 'System.IO.InvalidDataException' while loading byte array to the report
getting 'System.IO.InvalidDataException' while loading byte array to the report
Hello,
Maybe we did not exactly understand your question.
Method report.Load() loads a report template, and you try to load an image instead of it (as we understand from your code).
Could you explain your issue in more details?
Thank you.
Maybe we did not exactly understand your question.
Method report.Load() loads a report template, and you try to load an image instead of it (as we understand from your code).
Could you explain your issue in more details?
Thank you.
getting 'System.IO.InvalidDataException' while loading byte array to the report
Report Load function takes byte array or stream type parameters... so i was thinking an image can be loaded like that
getting 'System.IO.InvalidDataException' while loading byte array to the report
Hello,
You can create a report, place an image on it, load the image into the report using the code and with the help of the report.Load() to load the report.
Thank you.
You can create a report, place an image on it, load the image into the report using the code and with the help of the report.Load() to load the report.
Thank you.