Public Class wfReporte
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim pString As String = Request.QueryString("p")
        Dim rString As String = Request.QueryString("r")
        If Not String.IsNullOrEmpty(rString) Then
            Select Case rString
                Case "concurso"
                    Dim miReporte As New xrConcurso
                    If Not String.IsNullOrEmpty(pString) AndAlso IsNumeric(pString) Then
                        miReporte.Parameters("ParametroPlaza").Value = CInt(pString)
                        miReporte.PaperKind = Drawing.Printing.PaperKind.Letter
                        ASPxDocumentViewer1.Report = miReporte
                    End If
                Case "puesto"


                Case "postulante"
                    Dim miReporte As New xrPreseleccionados
                    If Not String.IsNullOrEmpty(pString) AndAlso IsNumeric(pString) Then
                        miReporte.Parameters("idPlaza").Value = CInt(pString)
                        miReporte.PaperKind = Drawing.Printing.PaperKind.Letter
                        ASPxDocumentViewer1.Report = miReporte
                    End If
                Case "ingresados"
                    Dim miReporte As New xrIngresados
                    If Not String.IsNullOrEmpty(pString) AndAlso IsNumeric(pString) Then
                        miReporte.Parameters("idPlaza").Value = CInt(pString)
                        miReporte.PaperKind = Drawing.Printing.PaperKind.Letter
                        ASPxDocumentViewer1.Report = miReporte
                    End If
                Case "competencias"
                    Dim miReporte As New xrCalificaciones
                    If Not String.IsNullOrEmpty(pString) AndAlso IsNumeric(pString) Then
                        miReporte.Parameters("idPlaza").Value = CInt(pString)
                        miReporte.PaperKind = Drawing.Printing.PaperKind.Letter
                        ASPxDocumentViewer1.Report = miReporte
                    End If
            End Select
        
        End If
        
    End Sub

End Class