Kevin G.
unread,Nov 13, 2008, 1:45:53 PM11/13/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
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.