Simplificar referencias a logos en RDLC y más limpieza de código
This commit is contained in:
@@ -229,8 +229,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
End Sub
|
||||
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
'If UsuarioActual.CveUsuario = 100 Then
|
||||
' Alert(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||
@@ -243,12 +243,7 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
lista.Add(New CrystalParametro("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
lista.Add(New CrystalParametro("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
lista.Add(New CrystalParametro("pFechaIni", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
|
||||
If Imagen.Exists Then
|
||||
lista.Add(New CrystalParametro("pImg", logouri))
|
||||
Else
|
||||
lista.Add(New CrystalParametro("pImg", ""))
|
||||
End If
|
||||
lista.Add(New CrystalParametro("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
Dim DTTemp As DataTable = DtDatos.Copy
|
||||
|
||||
@@ -260,6 +255,7 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
|
||||
End Sub
|
||||
'Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
' Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
' 'ubicacion del rdlc
|
||||
' Dim reportpath As String = "Contabilidad/Reportes/RepBalanzaComprobacion.rdlc"
|
||||
' 'nombre del reporte
|
||||
@@ -267,12 +263,7 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
' 'parametros a enviar al reporte
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
' params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("pImg", $"file://{Imagen.FullName}"))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("pImg", ""))
|
||||
' End If
|
||||
' params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
' params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
' params.Add(New ReportParameter("pFechaIni", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user