Posted on 2006-05-18
At the moment i'll use activeReports as an example only.
I have two reports which are identical (apart from the format)
we'll call them report1 and report2, both of which have a base class of ActiveReport
What i want to do is create one instance of Report called rpt and use that everywhere without having to instanciate two different versions.
So i want to do something like:
ActiveReport rpt = null;
rpt = new Report1();
rpt = new Report2();
// set other options and run report
rpt.property1 = "something here";
rpt.property2 = "something else";
How do i go about casting it to the appropriate report class?
Does that make sense?