Error cuando intentaba imprimir un pdf
This commit is contained in:
@@ -369,6 +369,7 @@ Partial Class Inventarios_Kardex
|
|||||||
Private Sub Imprimir(Optional reporte As String = "PDF")
|
Private Sub Imprimir(Optional reporte As String = "PDF")
|
||||||
|
|
||||||
Dim DtKardex As DataTable = Nothing
|
Dim DtKardex As DataTable = Nothing
|
||||||
|
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
||||||
DtKardex = CargarKardex(ddlProducto2.SelectedValue.ToEntero)
|
DtKardex = CargarKardex(ddlProducto2.SelectedValue.ToEntero)
|
||||||
If (Not IsNothing(DtKardex)) Then
|
If (Not IsNothing(DtKardex)) Then
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
@@ -379,12 +380,16 @@ Partial Class Inventarios_Kardex
|
|||||||
End If
|
End If
|
||||||
DtKardex.Dispose()
|
DtKardex.Dispose()
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
Alert("No hay informacion cargada", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
|
Private Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
|
||||||
GenerarPDF()
|
GenerarPDF()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||||
|
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
||||||
Dim Movimientos As New ClsInventarios
|
Dim Movimientos As New ClsInventarios
|
||||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||||
Dim Entrada As Boolean = cbEntrada.Checked
|
Dim Entrada As Boolean = cbEntrada.Checked
|
||||||
@@ -441,6 +446,9 @@ Partial Class Inventarios_Kardex
|
|||||||
Else
|
Else
|
||||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
Alert("Debes seleccionar un Producto/Servicio", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
Reference in New Issue
Block a user