Hola!! como andan, queria saber si alguno puedo exportar por código un rdlc a
excel pero que sea solo lectura.
yo uso éste código:
string reportType = "Excel";
string mimeType = string.Empty;;
string encoding;
string fileNameExtension;
string deviceInfo = string.Empty;
Warning[] warnings;
string[] streams;
byte[] renderedBytes;
renderedBytes = ReportViewer1.LocalReport.Render(
reportType,
deviceInfo,
out mimeType,
out encoding,
out fileNameExtension,
out streams,
out warnings);
System.Web.HttpContext.Current.Response.Buffer = true;
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.ContentType = mimeType;
System.Web.HttpContext.Current.Response.AddHeader("content-disposition",
"attachment;filename=" + "OC.xls");
System.Web.HttpContext.Current.Response.BinaryWrite(renderedBytes);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.End();
habrá alguna opción para hacerlo?? no econtré nada.
muchas gracias saludos
Roxana