Import Data Source From External DLL file

Stimulsoft Reports.WEB discussion
Post Reply
ChrisHolland
Posts: 45
Joined: Tue May 21, 2019 1:44 pm

Import Data Source From External DLL file

Post 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)
Attachments
W3CostPro.zip
(121.99 KiB) Downloaded 112 times
TestReport.mrt
(3.67 KiB) Downloaded 122 times
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Import Data Source From External DLL file

Post by Lech Kulikowski »

Hello,

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

Thank you.
ChrisHolland
Posts: 45
Joined: Tue May 21, 2019 1:44 pm

Re: Import Data Source From External DLL file

Post by ChrisHolland »

Hi, where do I do that?
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Import Data Source From External DLL file

Post 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.
ChrisHolland
Posts: 45
Joined: Tue May 21, 2019 1:44 pm

Re: Import Data Source From External DLL file

Post by ChrisHolland »

Thank you.
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Import Data Source From External DLL file

Post by Lech Kulikowski »

Hello

We are always glad to help you!

Thank you.
Post Reply