Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reflection Question
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Reflection Question
Divers
Thread ID:
01452083
Message ID:
01452083
Vues:
120
I'm trying to instantiate a Crystal Report class using reflection:
private void _SetupReport()
{
    int ReportId = Convert.ToInt32(Session.Contents["ReportId"].ToString());

    string Command = "SELECT ReportName FROM ApexReports WHERE RecordId = " + ReportId.ToString();
    DataSet dsReportName = DataLayer.ExecuteQuery(Command);

    string ReportClassName = dsReportName.Tables[0].Rows[0]["ReportName"].ToString();

    Report = (ReportDocument)Assembly.GetExecutingAssembly().CreateInstance(ReportClassName);

    CRViewer.ReportSource = Report;
}
Report is null when this runs. The vaariable ReportClassName contains the correct name. What am I doing wrong?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform