Exportación
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
namespace testDxReports1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
System.IO.MemoryStream stream1 = new System.IO.MemoryStream();
DevExpress.XtraReports.UI.XtraReport reporte = new XtraReport1(String.Format("{0}", Request["personType"]));
reporte.ExportToPdf(stream1);
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", String.Format("attachment; filename=report.{0}", "pdf"));
Response.AddHeader("content-length", stream1.Length.ToString());
Response.BinaryWrite(stream1.ToArray());
Response.End();
stream1.Close();
}
}
}