get report from DLL

Stimulsoft Reports.NET discussion
Post Reply
Sundara Manikandan
Posts: 14
Joined: Tue Dec 29, 2009 11:21 pm
Location: Chennai

get report from DLL

Post by Sundara Manikandan »

Hai,

I have added all my reports (compiled as dll) into a single class library and marked them as embedded resource. But I don't know how to call the report in code.

Please Help.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

get report from DLL

Post by Edward »

Hi

You can use the following static method of the report class:

public static StiReport GetReportFromAssembly(Stream assemblyStream)

So you need to load those resources into a byte array and then to load dll assembly from the byte array.

Assembly a = Assembly.Load(ProjectName.Properties.Resources.NameOfTheResourceWithAssemblyDll);
StiReport report = StiReport.GetReportFromAssembly(a);

Thank you.
Post Reply