private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { string myRptClassName; myRptClassName = listBox1.Text; string myCommand; myCommand = myRptClassName.Trim() + " rpt = new " + myRptClassName.Trim() + "()"; //Need to replace next line with some type of //macro substitution based off the value in the myRptClassName variable // foxpro would be // myCommand=allt(myRptClassName)+[ rpt = new ]+allt(myRptClassName)+[()] // &myCommand rpt_sch_Standard_Schedule rpt = new rpt_sch_Standard_Schedule(); this.viewer1.Document = rpt.Document; rpt.Run(); }