Nueva extensión: GenerarReportePDF. Agregar opción para Exportar PDF a RepIndicadorResumen.
- Se agregó nuevo paquete NuGet: iText7.pdfHTML
- Evolución de iTextSharp, reescrito desde cero. Se enfoca en separar las abstracciones de alto y bajo nivel.
- Soporte de HTML y CSS a la par de los navegadores actuales, esto genera PDFs que son casi idénticos al HTML original, algo que no era posible con iTextSharp
Más info: https://itextpdf.com/products/itext-7/convert-html-css-to-pdf-pdfhtml
https://itextpdf.com/blog/technical-notes/itext-7-and-itext-5-roadmaps-differences-updates
https://kb.itextpdf.com/home/it7kb/installation-guidelines/migration-guide-from-itext-5-to-itext-7#MigrationguidefromiText5toiText7-ConceptualAPIchanges
- Esto ocasionó que se actualizaran varias dependencias del sistema. **Tendrán que actualizar su web.config.**
- Se reescrbieron funciones de unos cuantos módulos para que usen iText7.pdfHTML, habrá que verificarlos que sigan generando los PDF correctamente.
- Estos módulos son:
Contabilidad/FiltraPolizas.aspx.vb
Contabilidad/RegPrePoliza.aspx.vb
Compras/PopUpVerFactura.aspx.vb
Ventas/ProductosServicios.aspx.vb
ClsPaginas.vb, NewGeneraBytesOC()
- Se agregó un HTML genérico con las hojas de estilo del sitio que se usará para la generación de reportes (Styles/ReportePDF.html)
+ ciertas modificaciones adicionales para hacer más estética la presentación de las tablas en el PDF
- Se arreglaron todos los archivos .refresh, el Visual Studio ya no debe mandar tantas advertencias al compilar.
- Se removió código huérfano
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIndicadorResumen.aspx.vb" Inherits="General_RepIndicadorResumen" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Exportar</asp:LinkButton>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportarPDF" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Exportar PDF</asp:LinkButton>
|
||||
</li>
|
||||
<%--<li>
|
||||
<asp:LinkButton ID="LnkExportarExcel" runat="server"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Exportar Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
@@ -41,7 +44,6 @@
|
||||
Reporte de Resumen de Indicadores
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<%--Tabla con los campos para filtrar--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
@@ -99,10 +101,8 @@
|
||||
<a href="http://www.amcharts.com/" class="amChartsLegend" id="amChartsAttribution">JS charts by amCharts</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel ID="UPTablaVxP" runat="server" class="portlet light xspadding bordered " align="left" UpdateMode="Conditional">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class General_RepIndicadorResumen
|
||||
Inherits ClsPaginas
|
||||
@@ -150,7 +149,13 @@ Partial Class General_RepIndicadorResumen
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles btnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExportarPDF_Click(sender As Object, e As EventArgs) Handles LnkExportarPDF.Click
|
||||
UPPMov.GenerarReportePDF("Reporte Resumen de Indicadores", TxtFechaI.Text, TxtFechaF.Text)
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
@@ -162,7 +167,7 @@ Partial Class General_RepIndicadorResumen
|
||||
If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1,
|
||||
-1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=1) Then
|
||||
VxP = ObjVentas.DtResultados
|
||||
VxP.DefaultView.Sort = "CveMoneda,SubTotal DESC"
|
||||
VxP.DefaultView.Sort = "CveMoneda, SubTotal DESC"
|
||||
VxP = VxP.DefaultView.ToTable
|
||||
GvVxP.DataSource = VxP
|
||||
Else
|
||||
@@ -173,7 +178,7 @@ Partial Class General_RepIndicadorResumen
|
||||
If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
|
||||
UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveProveedorClasificacion:=192) Then
|
||||
CxP192 = ObjCompras.DtResultados
|
||||
CxP192.DefaultView.Sort = "CveMoneda,SubTotal DESC"
|
||||
CxP192.DefaultView.Sort = "CveMoneda, SubTotal DESC"
|
||||
CxP192 = CxP192.DefaultView.ToTable
|
||||
GvCxP192.DataSource = CxP192
|
||||
Else
|
||||
@@ -184,7 +189,7 @@ Partial Class General_RepIndicadorResumen
|
||||
If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
|
||||
UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=1) Then
|
||||
CxP = ObjCompras.DtResultados
|
||||
CxP.DefaultView.Sort = "CveMoneda,SubTotal DESC"
|
||||
CxP.DefaultView.Sort = "CveMoneda, SubTotal DESC"
|
||||
CxP = CxP.DefaultView.ToTable
|
||||
GvCxP.DataSource = CxP
|
||||
Else
|
||||
@@ -198,7 +203,7 @@ Partial Class General_RepIndicadorResumen
|
||||
"-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
|
||||
CCxC = ObjMovtos.DtResultados
|
||||
CCxC.DefaultView.Sort = "CveMoneda,Saldo DESC"
|
||||
CCxC.DefaultView.Sort = "CveMoneda, Saldo DESC"
|
||||
CCxC = CCxC.DefaultView.ToTable
|
||||
GvCCxC.DataSource = CCxC
|
||||
Else
|
||||
@@ -210,7 +215,7 @@ Partial Class General_RepIndicadorResumen
|
||||
"-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
|
||||
CPxP = ObjMovtos.DtResultados
|
||||
CPxP.DefaultView.Sort = "CveMoneda,Saldo DESC"
|
||||
CPxP.DefaultView.Sort = "CveMoneda, Saldo DESC"
|
||||
CPxP = CPxP.DefaultView.ToTable
|
||||
GvCPxP.DataSource = CPxP
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user