Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass dynamic assembly to MS ReportViewer control
Message
From
31/03/2008 13:25:14
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
Pass dynamic assembly to MS ReportViewer control
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01307061
Message ID:
01307061
Views:
58
My application creates in-memory assembly in assemblyresolve event:

static EntityManager() {
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
}

public static Assembly EntityAssembly;

static Assembly CurrentDomain_AssemblyResolve(object sender,
ResolveEventArgs args) {

if (EntityAssembly == null)
EntityAssembly = CreateAssembly();
return EntityAssembly;
}

I'm using MS WinForms ReportViewer control in local mode.
Report definition refers codemodule Business which references to this assembly:

EntityExtension
Business

For running ReportViewer I use:

reportViewer1.LocalReport.ExecuteReportInCurrentAppDomain(
System.Reflection.Assembly.GetExecutingAssembly().Evidence);

reportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("EntityExtension");
reportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("Business");

Trying to preview report causes error

An error occured during local report processing
[BC30007] Reference required to assembly EntityExtension

How to fix ?

Andrus.
Andrus
Reply
Map
View

Click here to load this message in the networking platform