How can I pass crystal report class name to ReportDocument dynamically.
E.g.
ReportDocument rpt;
rpt = new ReportDocument();
rpt.Load(filepath);
but I need to use
ReportDocument rpt;
rpt = new CrystalReport1(); // CrystalReport1 is report name
But I need to pass "CrystalReport1" as dynamically, so dynamically it create Report object. How can I do that ?
I got the answer by my own , please check below..
CrystalReport obj = new CrystalReport();
ReportDocument rpt = (ReportDocument)obj;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With