Embed Reports as Resources

Stimulsoft Reports.NET discussion
Post Reply
Spence
Posts: 4
Joined: Thu Jun 15, 2006 3:42 am
Location: Australia

Embed Reports as Resources

Post 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?
[center]Certainty in Practice[/center]
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Embed Reports as Resources

Post 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();
Post Reply