-- mejora en validación
This commit is contained in:
@@ -765,7 +765,6 @@ Partial Class RepCxCDetalle
|
||||
logouri = String.Format("file://{0}", Imagen.FullName)
|
||||
End If
|
||||
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
@@ -774,20 +773,24 @@ Partial Class RepCxCDetalle
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}{CorteA}"))
|
||||
params.Add(New ReportParameter("TituloReporte", TituloReporte))
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
|
||||
Dim DSDatos As DataSet = CargaDatos()
|
||||
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DSDatos.Tables(0)}
|
||||
Dim dtt1 As DataTable = Nothing
|
||||
Dim dtt2 As DataTable = Nothing
|
||||
|
||||
If DSDatos IsNot Nothing AndAlso DSDatos.Tables.Count >= 1 Then
|
||||
dtt1 = DSDatos.Tables(0)
|
||||
If DSDatos.Tables.Count >= 2 Then dtt2 = DSDatos.Tables(1)
|
||||
End If
|
||||
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = dtt1}
|
||||
lrds.Add(rds)
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
Dim rdsCartera As New ReportDataSource With {.Name = "DSCartera", .Value = DSDatos.Tables(1)}
|
||||
Dim rdsCartera As New ReportDataSource With {.Name = "DSCartera", .Value = dtt2}
|
||||
lrds.Add(rdsCartera)
|
||||
Else
|
||||
Dim DTCartera As New DataTable
|
||||
@@ -800,7 +803,6 @@ Partial Class RepCxCDetalle
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepCxCDetalle.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
If Archivo.Exists Then
|
||||
ImprimirPDF(String.Format("{0}Formatos/RepCxCDetalle.rdlc", UsuarioActual.Empresa.Ruta), lrds, params, "ReporteCxCDetalle", TipoImpresion)
|
||||
@@ -808,8 +810,6 @@ Partial Class RepCxCDetalle
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCxCDetalle.rdlc", lrds, params, "ReporteCxCDetalle", TipoImpresion)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
|
||||
GenerarImpresion("PDF")
|
||||
|
||||
Reference in New Issue
Block a user