Tôi đã tạo mã để tạo báo cáo Crystal Reports trong PDF ... Nhưng nó mở trong cùng một trang của người dùng đã thực hiện tìm kiếm và nhấp vào nút ... Có bất kỳ cách nào để mở tệp PDF trong tab mới hoặc trang?Tạo báo cáo của Crystal trong PDF ... Cách mở trong tab hoặc trang mới?
Mã của tôi là:
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();
}
Thanks for the help!