Я сделал код для генерации отчета 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();
}
Спасибо за помощь!