public ActionResult hojaBloquesReport(FormCollection model) { var semana = Convert.ToInt32(model["semana"]); var year = Convert.ToInt32(model["year"]); var color = model["colores"]; var linea =Convert.ToInt32(model["lineas"]); if (_repositorio.existHojaBloque(semana, year, color,linea)) { var hojaBloques = _repositorio.getBloques(semana,year,color,linea); var reporte = new HojaBloquesReporte(); reporte.SetDataSource(hojaBloques); var stream = reporte.ExportToStream(ExportFormatType.PortableDocFormat); return File(stream, "application/pdf", string.Format("{0}-{1}-{2}-{3}{4}", "HojaBloque", semana,year,color, ".pdf")); } return RedirectToAction("GenerarReporteDeBloques"); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { HojaBloquesReporte rpt = new HojaBloquesReporte(); rpt.Site = this.Site; return rpt; }