Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the equivalent of VFP Macro Substitution in .Net
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00983761
Message ID:
00985017
Views:
36
>I just want to invoke a form based on what is listed in a table. My program would be too long if I have 300 reports and still will grow I am sure of that, and these are form based. Initially, I use switch and as I have said it's not flexible enough to accommodate additional reports long term especially adhoc reports without much developers intervention.

Here's some stuff I've been working on in VB (using reflection).
        'Assume we're loading this variable from a table
        lcReport = "ReportSelector.rptEmployeeList"

        Dim RptType As Type = Type.GetType(lcReport)

        Dim oReport As Object = Activator.CreateInstance(RptType)

        'Display report in report preview form
        Dim oPreview As New frmReportPreview(oReport)
        oPreview.MdiParent = Me.MdiParent
        oPreview.Show()
Del
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform