Page 1 of 1

Import Data Source From External DLL file

Posted: Wed Jun 12, 2019 9:46 am
by ChrisHolland
Are there any instructions for how to import a Data Source From External DLL file?

I tried importing two classes from my W3CostPro.Dll - EstimateHeader and EstimateSection, but it complains about the fact that the EstimateHeader class has a file of type EstimateSection within it.

I think it is a problem with the Namespace - not sure how to sort it though.

(See attached report, I have zipped up the Dll file as well)

Re: Import Data Source From External DLL file

Posted: Thu Jun 13, 2019 1:13 pm
by Lech Kulikowski
Hello,

You should add your assembly to the (Referenced Assemblies) property of the report.

Thank you.

Re: Import Data Source From External DLL file

Posted: Thu Jun 13, 2019 2:02 pm
by ChrisHolland
Hi, where do I do that?

Re: Import Data Source From External DLL file

Posted: Thu Jun 13, 2019 4:11 pm
by Lech Kulikowski
Hello,

You can use the followinf code:

Code: Select all

StiReport report = new StiReport();
string[] newRefAsssemblies = new string[9] 
{ "System.Dll", "System.Drawing.Dll", "System.Windows.Forms.Dll", "System.Data.Dll", "System.Xml.Dll", "Stimulsoft.Controls.Dll",
    "Stimulsoft.Base.Dll", "Stimulsoft.Report.Dll", "YourReference.dll"};
report.ReferencedAssemblies = newRefAsssemblies;
Thank you.

Re: Import Data Source From External DLL file

Posted: Thu Jun 13, 2019 7:14 pm
by ChrisHolland
Thank you.

Re: Import Data Source From External DLL file

Posted: Fri Jun 14, 2019 9:50 am
by Lech Kulikowski
Hello

We are always glad to help you!

Thank you.