cancel
Showing results for 
Search instead for 
Did you mean: 

The invoked member is not supported in a dynamic assembly?

Former Member
0 Kudos

I have an application that creates a report viewer control on a windows form. It then creates a derived ReportClass using System.Reflection.Emit. When the viewer ReportSource is set to the derived ReportClass we get the following message:

The invoked member is not supported in a dynamic assembly.

Any idea what is happening here?

Are dynamically created types not going to work?

Thanks,

mike.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have you tried with the ReportDocument class instead of ReportClass? I haven't played around with ReportClass but ReportDocument objects are what's usually passed to the viewer with the CR.NET SDK.

Former Member
0 Kudos

No, I haven't tried a ReportDocument. However, the same program seems to work if I code a C# class to do the same thing rather than dynamically create the derived ReportClass using Emit. So, I'm still wondering if there is something in the design of the CrystalReportViewer.ReportSource property that would prevent me from using dynamically generated classes. It seems like it might be making some reflection calls that are not supported on dynamic types?

Thanks,

mike.

Former Member
0 Kudos

It's entirely possible. The viewer's ReportSource does have COM dependencies for rendering the report. I haven't heard of anything specific to reflection and dynamic classes but from what I've heard there have been issues (not specific to CR) beween that and COM in general. I'm not well-versed in reflection so I can't speculate as to what the actual issue might be.

If you want a finite answer from the Product Group on this one, your best bet is to log a message. Otherwise, were you looking for another workaround, other than the one you've already found?

Former Member
0 Kudos

How do I go about logging a message for the Product Group?

Answers (0)