ImageBytes gets deleted upon calling report.Dispose()
Posted: Thu Aug 04, 2022 11:14 am
Hello,
whenever we are opening a report programatically which has a picture inbedded, and call .Dispose() or open it with a using() statement, the ImageBytes inside the report file get deleted.
Is this intended behaviour?
Opening with .Dipose():
Opening with using():
Thank you
whenever we are opening a report programatically which has a picture inbedded, and call .Dispose() or open it with a using() statement, the ImageBytes inside the report file get deleted.
Is this intended behaviour?
Opening with .Dipose():
Code: Select all
StiReport report = new StiReport();
string reportFile = "C:\dummyfile.mrt";
report.Load(reportFile);
report.Design(false);
report.Dispose();
Code: Select all
using (StiReport report = new StiReport()) {
string reportFile = "C:\dummyfile.mrt";
report.Load(reportFile);
report.Design(false);
}