ImageBytes gets deleted upon calling report.Dispose()

Stimulsoft Reports.NET discussion
Post Reply
maier.romeo
Posts: 1
Joined: Tue Aug 02, 2022 6:29 am

ImageBytes gets deleted upon calling report.Dispose()

Post by maier.romeo »

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():

Code: Select all

StiReport report = new StiReport();
string reportFile = "C:\dummyfile.mrt";
report.Load(reportFile);
report.Design(false);
report.Dispose();
Opening with using():

Code: Select all

using (StiReport report = new StiReport()) {
    string reportFile = "C:\dummyfile.mrt";
    report.Load(reportFile);
    report.Design(false);
}
Thank you
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: ImageBytes gets deleted upon calling report.Dispose()

Post by Lech Kulikowski »

Hello,

Yes, that is correct behavior.

Thank you.
Post Reply