In my C# code, how do I get this:

document.Reports.Add(new EandG_MonthlyReport(document));

to be in the correct format so that it will work with the
"EvalToObject" method contained here:

http://www.odetocode.com/code/80.aspx

In this example, "EandG_MonthlyReport" is the name of a class and I
want this to be a dynamic value so I don't have to have lots of IF
statements to accomplish what I'm trying to do.  E.g.:

                if (WebReport.Id == 41 || WebReport.Id == 42 ||
WebReport.Id == 43 || WebReport.Id == 48 || WebReport.Id == 49)
                {
                    document.Reports.Add(new IAReport(document));
                    document.Reports.Add(new
IAPDFAdditionalEmployeeReport(document));

                    return document;
                }
                else if (WebReport.Id == 96 || WebReport.Id == 97)
                {
                    document.Reports.Add(new NegativeResponseReport
(document));

.
.
.

This class name value is stored in a database table..  I've tried many
variations, and the main error I get is "Variable XXXXX is not
defined."

Please advise.

Thank you,
Kevin G.

Reply via email to