Referenced assembly not found

Stimulsoft Ultimate discussion
Post Reply
scott
Posts: 21
Joined: Tue Feb 22, 2011 1:57 pm
Location: USA

Referenced assembly not found

Post by scott »

Reports.Ultimate: 2010.2
Windows 7 Ultimate x64, English, SP1
.NET Framework 4, English

Loading a report from a template for viewing results in "Referenced assembly 'Imco.Stat.Reporting.ReportDataAccess.dll' not found" where Imco.Stat.Reporting.ReportDataAccess.dll is our assembly which is referenced in the project and via:

// Partial web service template creation code...
StiReport rep = new StiReport();
string[] references = rep.ReferencedAssemblies;
List newReferences = references.ToList();
newReferences.Add("Imco.Stat.Reporting.ReportDataAccess.dll");
rep.ReferencedAssemblies = newReferences.ToArray();
byte[] b;
b = rep.SaveToByteArray();
return b;

// Partial web service report creation code...
StiReport rep = new StiReport();
string[] references = rep.ReferencedAssemblies;
List newReferences = references.ToList();
newReferences.Add("Imco.Stat.Reporting.ReportDataAccess.dll");
rep.ReferencedAssemblies = newReferences.ToArray();
rep.Load("StiViolationsVersusTargetReport.mrt");
rep.Compile();
rep.Render();
byte[] b;
b = rep.SaveDocumentToByteArray();
return b;

// Partial client template view/save code...
StiReport rpt = new StiReport();
byte[] b;
b = // Call web service to get report template byte[]
rpt.Load(b);
StiWebDesigner1.Design(rpt);
// Save report template
protected void StiWebDesigner1_SaveReport(object sender,
StiWebDesigner.StiSaveReportEventArgs e)
{
StiReport rpt = e.Report;
rpt.Save("StiViolationsVersusTargetReport.mrt");
}

// Partial client report viewer code...
StiReport rpt = new StiReport();
byte[] b;
b = // Call web service to get report byte[]
rpt.LoadDocument(b);
StiWebViewerFx1.Report = rpt;

Thank you!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Referenced assembly not found

Post by Alex K. »

Hello,

Please check the following code for change reference:

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", "MyReference.dll"};
report.ReferencedAssemblies = newRefAsssemblies;
Thank you.
scott
Posts: 21
Joined: Tue Feb 22, 2011 1:57 pm
Location: USA

Referenced assembly not found

Post by scott »

Thank you very much, Aleksey. All is working fine now.
Andrew
Posts: 4107
Joined: Fri Jun 09, 2006 3:58 am

Referenced assembly not found

Post by Andrew »

Our team is happy to help you.
Post Reply