0

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?

  • Possible duplicate of [Open the link in new window in crystal report](http://stackoverflow.com/questions/13636429/open-the-link-in-new-window-in-crystal-report) – Sun Mar 06 '17 at 19:36
  • @Sun I am not using CrystalReportViewer to display the report. I am exporting it to PDF. The URL you mentioned is for Crystal Report Viewer. However, I tried sWindow=New in the hyperlink with Text Intrepretation: none and that didnt work either. – Megha Gowder Mar 06 '17 at 19:47

0 Answers0