Page 1 of 1

get report from DLL

Posted: Mon Jan 11, 2010 1:23 am
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.

get report from DLL

Posted: Mon Jan 11, 2010 6:33 am
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.