Quantcast
Channel: Visual Studio Report Controls Forum
Viewing all articles
Browse latest Browse all 519

"Failed to load expression host assembly" when rendering local report

$
0
0

I am getting the error "Failed to load expression host assembly" when rendering a local report using report viewer.

My report is in a folder called Reports, which exists in a class library. I call the following with report viewer:

reportViewer.LocalReport.ReportEmbeddedResource = "namespace.project.Reports.myReport.rdlc";

This appears to be the correct reference, as if I change it to something that doesn't exist I receive the following error: "{"The report definition for report 'blah' has not been specified"}

I have searched a few forums and websites and some people have encountered the same error, and solved it by using:

            System.Security.PermissionSet permissions = new System.Security.PermissionSet(System.Security.Permissions.PermissionState.Unrestricted);
            reportViewer.LocalReport.SetBasePermissionsForSandboxAppDomain(permissions);

However this hasn't worked for me.

Any help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 519


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>