I am exporting the Crystal report to PDF. The hyperlink in the crystal report opens in the same window even when I have mentioned target = _blank in the HTML tag (
<a href = "http://localhost/Search.aspx?firstArg=23&SecArg=34" target="_blank"> Click Here </a>
)
Dim Report As New rptCrystalReport
Report.SetDataSource(ReportData)
Dim stream As System.IO.Stream = Report.ExportToStream(CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat)
Report.Dispose()
Dim PDFByteArray As Byte() = New [Byte](stream.Length - 1) {}
stream.Position = 0
stream.Read(PDFByteArray, 0, Convert.ToInt32(stream.Length))
Context.Response.ClearContent()
Context.Response.ClearHeaders()
Context.Response.AddHeader("content-disposition", "filename=Report.pdf")
Context.Response.ContentType = "application/pdf"
Context.Response.AddHeader("content-length", PDFByteArray.Length.ToString())
Context.Response.BinaryWrite(PDFByteArray)
Context.Response.Flush()
Is it possible to open the new page in new window when crystal report is exported to PDF?