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.
Deriving from Stimulsoft.Report.StiReport
Deriving from Stimulsoft.Report.StiReport
As i understand you create class inherited from StiReport and want use this class for create, design and preview report? if yes, then you can use static propertybert123 wrote: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.
StiReport.ReportType. By default this property equal typeof(StiReport). For also please contact to support[at]stimulsoft[dot]com. We send you link to version with updated code in type.BaseType == typeof(StiReport).
Thanks.