Error:
Resolution:If you use custom DLL in your SSRS reports, make sure the DLL is copied over to the shared DLL folder. For VS2017 Community Edition, copy over the DLL to this folder…
Other Locations:
Sources: https://stackoverflow.com/questions/43520437/ssrs-custom-assemblies-could-not-be-loaded-under-visual-studio-2017 J O I do not have it in the GAC right now. In code I have assigned all permissions and also the asp.net account has full permission (it is a DNN application). I have also have added allowpartialtrusted...blahah to the assembly, granted file i/o permissions...I really do not get it. I have next code: public class ReportControlBase _reportViewer = new ReportViewer (); _reportViewer.ProcessingMode = ProcessingMode.Local; _reportViewer.LocalReport.DisplayName = "#V4A";// clsConversions.DateTimeToStringUTCNoSeparatorSymbols (DateTime.Now); //Not needed probably. //FileIOPermission fileReadPerm = new FileIOPermission(FileIOPermissionAccess.Read, reportRDLCFileName); string
strCustomAssemblyPath = System.IO.Directory.GetCurrentDirectory() + @"\V4A.DNN.Modules.Store.PaymentGateway.Reports.Resources.dll"; //_reportViewer.LocalReport.AddTrustedCodeModuleInCurrentAppDomain(typeof(V4A.DNN.Modules.Store.Components.Reports.Resources.OrderLocalization).FullName); _reportViewer.ShowRefreshButton = false; System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(userLocale); //set default parameters. if (reportParameters != null) ////Report page settings. //Load actual data _reportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); //http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=241256&SiteID=1 Warning[] warnings = null; byte[] bytes = _reportViewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out fileNameExtension, out streams, out warnings); //outputFile += "test.pdf"; } |