agregando rdlc al reporte

This commit is contained in:
Antonio Gonzalez
2020-02-18 16:37:42 -07:00
parent 06fae5cf98
commit 8b7f550b15
2 changed files with 30 additions and 10 deletions

View File

@@ -15,6 +15,9 @@
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkPDF" OnClick="LnkPDF_Click" runat="server"><i class="fa fa-ad-pdf "></i> PDF</asp:LinkButton>
</li>
<li> <li>
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-ad-excel "></i> Excel</asp:LinkButton> <asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-ad-excel "></i> Excel</asp:LinkButton>
</li> </li>

View File

@@ -5,6 +5,8 @@ using System.Web;
using System.Web.UI; using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using Extensiones; using Extensiones;
using Microsoft.Reporting.WebForms;
using System.Data;
public partial class General_CATIEPSxEntidadFed : ClsPaginas public partial class General_CATIEPSxEntidadFed : ClsPaginas
{ {
#region Propiedades #region Propiedades
@@ -33,7 +35,10 @@ public partial class General_CATIEPSxEntidadFed : ClsPaginas
get { return (ViewState["RfechaFin"] == null) ? "-1" : (ViewState["RfechaFin"]).ToString(); } get { return (ViewState["RfechaFin"] == null) ? "-1" : (ViewState["RfechaFin"]).ToString(); }
set { ViewState["RfechaFin"] = value; } set { ViewState["RfechaFin"] = value; }
} }
private DataTable DtIEPS{
get { return (ViewState["DtIEPS"] == null) ? null : (DataTable)(ViewState["DtIEPS"]); }
set { ViewState["DtIEPS"] = value; }
}
#endregion #endregion
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
@@ -65,6 +70,7 @@ public partial class General_CATIEPSxEntidadFed : ClsPaginas
ClsGenerales ObjIEPS = new ClsGenerales(); ClsGenerales ObjIEPS = new ClsGenerales();
ObjIEPS.IEPSxEntidadFed(RcveEstado, RtasaIEPS, RfechaInicio, RfechaFin, 119, RAgrupador); ObjIEPS.IEPSxEntidadFed(RcveEstado, RtasaIEPS, RfechaInicio, RfechaFin, 119, RAgrupador);
GVIEPSxEntidadFed.DataSource = ObjIEPS.DtResultados; GVIEPSxEntidadFed.DataSource = ObjIEPS.DtResultados;
DtIEPS = ObjIEPS.DtResultados;
ObjIEPS.Dispose(); ObjIEPS.Dispose();
GVIEPSxEntidadFed.DataBind(); GVIEPSxEntidadFed.DataBind();
upDatosIEPS.Update(); upDatosIEPS.Update();
@@ -102,4 +108,15 @@ public partial class General_CATIEPSxEntidadFed : ClsPaginas
{ {
GVIEPSxEntidadFed.ExportToExcelx("IEPS porEntidad Federativa"); GVIEPSxEntidadFed.ExportToExcelx("IEPS porEntidad Federativa");
} }
protected void LnkPDF_Click(object sender, EventArgs e)
{
List<ReportParameter> paramList = new List<ReportParameter>();
paramList.Add(new ReportParameter("Logo", String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)));
paramList.Add(new ReportParameter("FechaInicio", TxtIEPSfechaInicio.Text));
paramList.Add(new ReportParameter("FechaFin", TxtIEPSfechaFin.Text));
paramList.Add(new ReportParameter("Agrupador", DdlAgrupador.SelectedValue));
ImprimirPDF("Empresas/Grales/Formatos/CatIepsEntidadFed.rdlc", DtIEPS, paramList,"IEPS por entidades federativa",RDSName:"DsInventarios");
}
} }