Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass dynamic assembly to MS ReportViewer control
Message
De
31/03/2008 13:25:14
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Pass dynamic assembly to MS ReportViewer control
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01307061
Message ID:
01307061
Vues:
57
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
Répondre
Fil
Voir

Click here to load this message in the networking platform