Fix Logos Empresas RDLCs

This commit is contained in:
MLopez
2022-12-22 16:11:06 -07:00
parent 67b56392a0
commit b2a6ad203d
56 changed files with 137 additions and 106 deletions

View File

@@ -110,25 +110,16 @@ public partial class OC_ListaRequisicion : ClsPaginas
RutaPDF = "Empresas/Grales/Formatos/ListaRequisicion.rdlc";
}
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
// var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
List<ReportParameter> @params = new List<ReportParameter>();
@params.Add(new ReportParameter("pImg", new Uri(Server.MapPath(string.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri));
@params.Add(new ReportParameter("pImg", Imagen.Exists ? $"file://{Imagen.FullName}" : ""));
@params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
@params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString()));
if (Imagen.Exists)
{
@params.Add(new ReportParameter("LogoPath", $"file://{Imagen.FullName}"));
}
else
{
@params.Add(new ReportParameter("LogoPath", ""));
}
@params.Add(new ReportParameter("LogoPath", Imagen.Exists ? $"file://{Imagen.FullName}" : ""));
ImprimirPDF(RutaPDF, DTDatos, @params, "Lista de Requisicion", Formato);
}