Exportar reporte a Excel
This commit is contained in:
@@ -58,7 +58,8 @@ public partial class GPS_RepIgnicion : ClsPaginas
|
||||
DtIgniciones = ObjGPS.DtResultados;
|
||||
GvIgnicion.DataSource = DtIgniciones;
|
||||
GvIgnicion.DataBind();
|
||||
LnkImprimirPDF.Visible = true;
|
||||
LnkImprimirPDF.Visible = true;
|
||||
LnkImprimirEXCEL.Visible = true;
|
||||
}
|
||||
}
|
||||
UpDatos.Update();
|
||||
@@ -104,14 +105,18 @@ public partial class GPS_RepIgnicion : ClsPaginas
|
||||
|
||||
protected void LnkImprimirPDF_Click(object sender, EventArgs e)
|
||||
{
|
||||
EnviarReporteProgramado();
|
||||
EnviarReporteProgramado("PDF");
|
||||
}
|
||||
protected void LnkImprimirEXCEL_Click(object sender, EventArgs e)
|
||||
{
|
||||
EnviarReporteProgramado("EXCEL");
|
||||
}
|
||||
public void EnviarReporteProgramado()
|
||||
public void EnviarReporteProgramado(string Formato = "PDF")
|
||||
{
|
||||
if (DtIgniciones != null)
|
||||
{
|
||||
byte[] retorno;
|
||||
string RutaReporte = "Empresas/Grales/ReportesProgramados/RPIgnicion.rdlc";
|
||||
string RutaReporte = ModExtensiones.DirectorioBaseEmpresas + "Empresas/Grales/ReportesProgramados/RPIgnicion.rdlc";
|
||||
|
||||
try
|
||||
{
|
||||
@@ -121,10 +126,10 @@ public partial class GPS_RepIgnicion : ClsPaginas
|
||||
RptParametro.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Usuario));
|
||||
RptParametro.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy HH:mm tt")));
|
||||
|
||||
retorno = StreamPDF(RutaReporte, DtIgniciones, RptParametro, "ReporteEventos", "PDF", "DsOC");
|
||||
retorno = StreamPDF(RutaReporte, DtIgniciones, RptParametro, "ReporteEventos", Formato, "DsOC");
|
||||
// TODO: Labeled Arguments not supported. Argument: 6 := 'MR'
|
||||
// TODO: Labeled Arguments not supported. Argument: 7 := 'RDSName'
|
||||
ImprimirbytesPDF(retorno, "ReporteEventos");
|
||||
ImprimirbytesPDF(retorno, "ReporteEventos", Formato: Formato);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user