Simplificar/limpiar código logos reportes RDLC

This commit is contained in:
MLopez
2022-12-22 19:49:13 -07:00
parent b2a6ad203d
commit 2e4bfe761b
141 changed files with 237 additions and 1158 deletions

View File

@@ -122,19 +122,15 @@ Partial Class Contabilidad_RepIEPS
Dim Modalidad As String = $"&emsp;<b>Modalidad:</b> {DdlModalidad.SelectedItem.Text}"
If DtDatos.Rows.Count > 0 Then
Dim Imagen As System.IO.FileInfo = New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri As String = 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(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
'Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim para As List(Of ReportParameter) = New List(Of ReportParameter)()
para.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
para.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
para.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString()))
para.Add(New ReportParameter("Filtros", $"<b>Filtros:</b> {FechaI}{FechaF}{TipoOperacion}{Modalidad}"))
If Imagen.Exists Then
para.Add(New ReportParameter("LogoPath", logouri))
Else
para.Add(New ReportParameter("LogoPath", ""))
End If
para.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
ImprimirPDF("Empresas/Grales/Formatos/RepIEPS.rdlc", DtDatos, para, "Reporte de IEPS", Opcion)
Else