Deriving from Stimulsoft.Report.StiReport
Posted: Mon Jun 19, 2006 3:40 pm
I created a C# class derived from Stimulsoft.Report.StiReport
class MyDerivedReport : Stimulsoft.Report.StiReport.
I have the assembly registered in the GAC and added assembly reference in the report Designer. I used the code editor to change the base class from StiReport to MyDerivedReport. The Preview fails with a message:
Method: [Create Instance]
Object reference not sset to an instance of an object.
Looking at the StiReport.cs source code I found that the GetReportsFromAssembly method expects
type.BaseType == typeof(StiReport)
Any suggestions to work around this??
I could change the source line to type.IsSubclassOf(typeof(StiReport)) but I don't know the reason for the restriction of direct derivation.
class MyDerivedReport : Stimulsoft.Report.StiReport.
I have the assembly registered in the GAC and added assembly reference in the report Designer. I used the code editor to change the base class from StiReport to MyDerivedReport. The Preview fails with a message:
Method: [Create Instance]
Object reference not sset to an instance of an object.
Looking at the StiReport.cs source code I found that the GetReportsFromAssembly method expects
type.BaseType == typeof(StiReport)
Any suggestions to work around this??
I could change the source line to type.IsSubclassOf(typeof(StiReport)) but I don't know the reason for the restriction of direct derivation.