Page 1 of 1

Embed Reports as Resources

Posted: Thu Jun 15, 2006 3:45 am
by Spence
I have entered this project after much of the work was done on the reports. I love them btw, and the support from stimulsoft is great.

What I'd like to know though is whether anyone has embedded the reports as a resource in visual studio. Although our solution allows them to upgrade asynchronously, they really need dataset changes for a content change and as such I think that they should be part of the executable package. Is this possible, or must the path to the report be a file?

Embed Reports as Resources

Posted: Thu Jun 15, 2006 4:33 am
by Vital
spenceee wrote:I have entered this project after much of the work was done on the reports. I love them btw, and the support from stimulsoft is great.

What I'd like to know though is whether anyone has embedded the reports as a resource in visual studio. Although our solution allows them to upgrade asynchronously, they really need dataset changes for a content change and as such I think that they should be part of the executable package. Is this possible, or must the path to the report be a file?
Yes, it possible. Use this code:

Code: Select all

Stream stream = assembly.GetManifestResourceStream("Assembly.Report.mrt");
StiReport report = new StiReport();
report.Load(stream);
stream.Close();