none
La entrada no es una cadena Base 64 válida porque contiene un carácter que no es Base 64 RRS feed

  • Pregunta

  • Este es mi codigo

        Sub LoadGages()
            Dim Escenario As String = Session("escenarioPI")
            Dim Periodo As String = "d"
            Dim FI As String = Session("FechaIni")
            Dim FF As String = Session("FechaFin")
            Dim FiltroFecha As String = ""
            Dim FiltroQ As String = ""
    
            If FI <> "" And FF <> "" Then
                FiltroFecha = " and  convert(varchar(19),fechaIni,120) between '" & FI & "' and '" & FF & "'"
            End If
    
            FiltroQ = ""
            If Trim(Session("SelEsta")) <> "" Then FiltroQ = FiltroQ & " and  estacionid='" & Trim$(Session("SelEsta")) & "'"
            If Trim(Session("SelMaqi")) <> "" Then FiltroQ = FiltroQ & " and  Maquinaid='" & Trim$(Session("SelMaqi")) & "'"
            If Trim(Session("SelPart")) <> "" Then FiltroQ = FiltroQ & " and  Productoid='" & Trim$(Session("SelPart")) & "'"
            If Trim(Session("SelForm")) <> "" Then FiltroQ = FiltroQ & " and  Formatoid='" & Trim$(Session("SelForm")) & "'"
            'If Trim(Session("SelCarac")) <> "" Then FiltroQ = FiltroQ & " and  Caracteristicaid='" & Trim$(Session("SelCarac")) & "'"
    
            If Escenario = "" Then Exit Sub
    
            ds = datos.IndicadoresII(Escenario)
    
            Dim numind As Integer = ds.Tables("IndicadoresII").Rows.Count - 1
            Session("numind") = numind
            Dim i As Integer
            Dim columnas As String = ""
            Dim tempcol As String = ""
            Dim templim As String = ""
            Dim IndDesc As String = ""
            Dim Tipo As Integer = 0
            Dim decimales As Integer = 3
    
            For i = 0 To numind
                tempcol = ds.Tables("IndicadoresII").Rows(i)(0)
                IndDesc += ds.Tables("IndicadoresII").Rows(i)(1) & ","
                Tipo = ds.Tables("IndicadoresII").Rows(i)(2)
                decimales = ds.Tables("IndicadoresII").Rows(i)(3)
    
                If Tipo = 1 Or Tipo = 2 Then
                    columnas += "sum(" & tempcol & ") as " & tempcol & ","
                Else
                    columnas += "avg(" & tempcol & ") as " & tempcol & ","
                End If
    
                templim += "avg(LI_ind" & Mid(tempcol, 4, 3) & ") as LI_ind" & Mid(tempcol, 4, 3) & ",avg(LS_ind" & Mid(tempcol, 4, 3) & ") as LS_ind" & Mid(tempcol, 4, 3) & "," & decimales & " as decimales" & tempcol & ","
            Next i
    
            If columnas <> "" Then
                columnas += templim
                columnas = Mid(columnas, 1, Len(columnas) - 1)
                IndDesc = Mid(IndDesc, 1, Len(IndDesc) - 1)
            End If
    
            If columnas <> "" Then
                ds = datos.HistoricoII(columnas, Escenario, Periodo, FiltroFecha, FiltroQ)
    
                Dim t As Integer = ds.Tables("HistoricoII").Rows.Count - 1
                If t > -1 Then
                    Dim colIndex As Integer
    
                    Response.Write("<Table style=" & Chr(34) & "width: 100%; background-color:white; border:none; padding:1px; border-spacing:1px;" & Chr(34) & ">")
    
                    For colIndex = 1 To numind + 1 '(myDataSet.Tables("Query1").Columns.Count) - 1
                        Dim columnName As String = ds.Tables("HistoricoII").Columns(colIndex).ColumnName
                        Dim LS As String = "LS_ind" & Mid(columnName, 4, 3)
                        Dim LI As String = "LI_ind" & Mid(columnName, 4, 3)
    
                        ' Carga Gauge
                        Dim Gauge2 As ASPxGaugeControl = Me.ASPxGaugeControl1
    
                        Response.Write("<tr style=" & Chr(34) & "border:solid; text-align:center; vertical-align:top;" & Chr(34) & ">" & _
                                       "<td style=" & Chr(34) & "text-align:center; vertical-align:top;" & Chr(34) & ">")
    
                        Gauge2.Width = 200
                        Gauge2.Height = 200
                        Gauge2.AutoLayout = True
    
                        Dim chartGauge = Me.WebChartControl1
                        Dim g As Integer = t
    
                        Do While IsDBNull(ds.Tables("HistoricoII").Rows(g)(columnName)) And g > 0
                            g = g - 1
                        Loop
    
                        If Not IsDBNull(ds.Tables("HistoricoII").Rows(g)(columnName)) Then
                            Dim limrng As Double
                            Dim circularGauge2 As DevExpress.Web.ASPxGauges.Gauges.Circular.CircularGauge = Gauge2.Gauges(0)
                            Dim escala2 = circularGauge2.Scales(0)
    
                            limrng = (ds.Tables("HistoricoII").Rows(g)(LS) - ds.Tables("HistoricoII").Rows(g)(LI)) * 0.1
    
                            If limrng = 0 Then limrng = 1
                            escala2.MinValue = ds.Tables("HistoricoII").Rows(g)(LI) - limrng
                            escala2.MaxValue = ds.Tables("HistoricoII").Rows(g)(LS) + limrng
    
                            Dim escalaInferior2 = circularGauge2.Scales(0).Ranges(0)
                            escalaInferior2.AppearanceRange.ContentBrush = New SolidBrushObject(Color.Red)
                            escalaInferior2.StartValue = ds.Tables("HistoricoII").Rows(g)(LI) - limrng
                            escalaInferior2.EndValue = ds.Tables("HistoricoII").Rows(g)(LI)
    
                            Dim escalaCentro2 = circularGauge2.Scales(0).Ranges(1)
                            escalaCentro2.AppearanceRange.ContentBrush = New SolidBrushObject(Color.ForestGreen)
                            escalaCentro2.StartValue = ds.Tables("HistoricoII").Rows(g)(LI)
                            escalaCentro2.EndValue = ds.Tables("HistoricoII").Rows(g)(LS)
    
                            Dim escalaSuperior2 = circularGauge2.Scales(0).Ranges(2)
                            escalaSuperior2.AppearanceRange.ContentBrush = New SolidBrushObject(Color.Red)
                            escalaSuperior2.StartValue = ds.Tables("HistoricoII").Rows(g)(LS)
                            escalaSuperior2.EndValue = ds.Tables("HistoricoII").Rows(g)(LS) + limrng
    
                            Dim valor As String
                            valor = IIf(IsDBNull(ds.Tables("HistoricoII").Rows(g)(columnName)), "", ds.Tables("HistoricoII").Rows(g)(columnName))
    
                            If valor <> "" Then
                                circularGauge2.Needles(0).Value = valor
                                circularGauge2.Scales(0).MajorTickmark.FormatString = "{0:F" & ds.Tables("HistoricoII").Rows(g)("decimales" & columnName) & "}"
                            Else
                                circularGauge2.Needles(0).Value = Nothing
                            End If
    
                            '''''''''''''''''''''''''''''''''''
                            Dim seriesName As String = ds.Tables("HistoricoII").Columns(colIndex).ColumnName
    
                            Dim row As DataRow
                            Dim YVal As Double = 0
                            Dim XVal As String = ""
    
                            chartGauge.Series.Clear()
                            chartGauge.Series.Add(seriesName, ViewType.Line)
    
                            For Each row In ds.Tables("HistoricoII").Rows
                                If Not IsDBNull(row(columnName)) Then
                                    YVal = (CDbl(row(columnName)))
                                    XVal = row(0)
                                    chartGauge.Series(seriesName).Points.Add(New SeriesPoint(XVal, YVal))
                                End If
                            Next
    
                            '''''''''''''''''Gauge''''''''''''''''''''''
                            ''''''''''''''''''''''''''''''''''''''''''''
                            Gauge2.Visible = True
                            Gauge2.Page = Page
                            Dim writer3 = New Html32TextWriter(Page.Response.Output)
                            Gauge2.RenderControl(writer3)
    
                            Response.Write("</td><td>")
                            'Response.Write("<tr><td>")
    
                            '''''''''''''''''CHART''''''''''''''''''''''
                            ''''''''''''''''''''''''''''''''''''''''''''
                            chartGauge.Visible = True
                            chartGauge.Page = Page
                            Dim writer4 = New Html32TextWriter(Page.Response.Output)
                            chartGauge.RenderControl(writer4)
    
                            Response.Write("</td></tr>")
                        Else
                            Gauge2.Visible = False
                            chartGauge.Visible = False
                        End If
                    Next colIndex
    
                    Response.Write("</table>")
                End If
            End If
    
            Me.ASPxGaugeControl1.Visible = False
            Me.WebChartControl2.Visible = False
        End Sub

    este es el error que me aparece al querer hacer una segunda consulta


    Rick Gzz

    jueves, 10 de diciembre de 2015 18:34

Respuestas

  • A juzgar por la traza de pila que hay en la imagen que adjuntas, el error se produce internamente dentro de un control de DevExpress. Por el tipo de error, parece que es un problema de programación interna de ese control, es decir, está tratando de deserializar en Base64 alqo que no es Base64. Podrías preguntar en un foro de soporte de DevExpress, por si acaso es un problema conocido y existe un "workaround", o de lo contrario abrir un incidente de soporte con DevExpress.
    viernes, 11 de diciembre de 2015 7:53