Beispiel #1
0
        public ActionResult report(string codigo)
        {
           if( _repositorio.existCorte(codigo)){
            var cuponModels = _repositorio.getReportCupones(codigo);
             var cupones = new CuponesReporte();
            cupones.SetDataSource(cuponModels);

            var stream = cupones.ExportToStream(ExportFormatType.PortableDocFormat);
           
            return  File(stream, "application/pdf",string.Format("{0}-{1}{2}","Cupones",codigo,".pdf"));
           }
            return RedirectToAction("creacionCupones");
        }
Beispiel #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     CuponesReporte rpt = new CuponesReporte();
     rpt.Site = this.Site;
     return rpt;
 }