Can I create a class from a variable?
I have a variable, RptName.
I've got a slew of classes that represent reports, such as:
If the value of RptName = "RptCAMainSum" then I want the class:
If the value of RptName = "RptTPEMainSum" the I want the class:
Of course I could use a long if() else if() block but if I can, I'd rather find a way to call the class from the value of the var.
IReport oReport = Class(RptName);
var oReport = eval(RptName);
this would return the object named whatever the value of RptName is.
I hope that makes sense.
Is there any way to do this?