Создать отчет Crystal в PDF...Как открыть в новой вкладке или странице?

Я сделал код для генерации отчета Crystal Reports в PDF...Но он открывается на той же странице, где пользователь сделал поиск и нажал на кнопку...Есть ли способы открыть PDF в новой вкладке или странице?

Мой код:

private void OpenPDF()
{
    ReportDocument Rel = new ReportDocument();
    Rel.Load(Server.MapPath("../Reports/Test.rpt"));
    BinaryReader stream = new BinaryReader(Rel.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat));
    Response.ClearContent();
    Response.ClearHeaders();
    Response.ContentType = "application/pdf";
    Response.BinaryWrite(stream.ReadBytes(Convert.ToInt32(stream.BaseStream.Length)));
    Response.Flush();
    Response.Close(); 
}

Спасибо за помощь!

9
задан JohnyMoraes 7 February 2012 в 16:56
поделиться