Example #1
0
        /// <summary>
        /// Devuelve el documento a reimprimir para el recibo
        /// correspondiente
        /// </summary>
        /// <param name="unRecibo">Recibo</param>
        /// <returns>Documento a imprimir</returns>
        private static ReportDocument GetReporteReciboRe(Recibo unRecibo)
        {
            try {
                // Inserta el Header del recibo. Crea una instancia de la
                // tabla Factura que se encuentra en el componente DSInforme
                var ds = new DSInformes();

                // Carga los datos del recibo en la tabla. Esta se
                // utilizará para completar el informe.
                ds.Recibo.AddReciboRow(
                    unRecibo.Numero,
                    unRecibo.Concepto.Nombre,
                    unRecibo.Importe,
                    string.Format("{0}. {1}", unRecibo.Pago.Tipo.Nombre, unRecibo.Descripcion),
                    unRecibo.Fecha,
                    string.Format("{0} (Cód.:{1})", unRecibo.Pago.Cuenta.Titular.Nombre, unRecibo.Pago.Cuenta.Codigo),
                    unRecibo.Pago.Cuenta.Codigo,
                    Numalet.ToString(unRecibo.Importe),
                    1,
                    unRecibo.Pago.Cuenta.Entidad.Nombre);
                // Crea el reporte
                var reporte = new RReciboRe();
                reporte.SetDataSource(ds);
                return reporte;
            } catch (Exception e) {
                Sistema.Controlador.logear("ERROR-IMPRIMIR-RECIBO", ENivelMensaje.ERROR, e.ToString());
                throw;
            }
        }
Example #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     RReciboRe rpt = new RReciboRe();
     rpt.Site = this.Site;
     return rpt;
 }