on 10-06-2008 10:46 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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?
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.