Imports System.Reflection
Imports Telerik.Reporting
Imports Telerik.Reporting.Examples.CSharp

Partial Public Class ReportViewer
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            'Dim reportType As Type = Type.[GetType](Request.QueryString("report"))
            'reportType.GetConstructors()
            'Dim report = DirectCast(Activator.CreateInstance(reportType), Telerik.Reporting.Report)

            Dim reportType As Type = Type.[GetType](Request.QueryString("report"))
            Dim ctor As ConstructorInfo = reportType.GetConstructor(New Type() {GetType(String)})
            Dim report As Report = DirectCast(ctor.Invoke(New Object() {"my custom value"}), Report)

            'check the report type and set report parameter value
            If TypeOf report Is ReportParameterDemo Then
                report.ReportParameters("Parameter1").Value = Request.QueryString("parameter1")
            End If

            'set the report 
            Me.ReportViewer1.Report = report
        End If
    End Sub

End Class