HI all,
New to ASP.
I have a form that exports a crystal report to pdf and then displays the report in the browser:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim dfdoCustomers As New _
CrystalDecisions.Shared.DiskFileDestinationOptions
Dim szFileName As String = "c:\windows\temp\myreport2.pdf"
dfdoCustomers.DiskFileName = szFileName
With bbreport
bbreport.SetParameterValue("Team", DropDownList1.SelectedItem.Value)
.ExportOptions.ExportDestinationType = _
CrystalDecisions.Shared.ExportDestinationType.DiskFile
.ExportOptions.ExportFormatType = _
CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
.ExportOptions.DestinationOptions = dfdoCustomers
.Export()
End With
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(szFileName)
Response.Flush()
Response.Close()
End Sub
Pretty basic, however I have an issue and I am thinking it's not uncommon or hard, I just don't know how to solve it. I want the user to be able to go back to the original form (The form that the user clicked the button to export the report since it's based on parameters and I want the user to be able to re-submit using new parameters). However, after the pdf is opened, the back button is not available to return to the form. I am thinking of two solutions, 1) open the pdf in a new window, or 2) somehow make it possible to return to the original form. Any thoughts?
New to ASP.
I have a form that exports a crystal report to pdf and then displays the report in the browser:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim dfdoCustomers As New _
CrystalDecisions.Shared.DiskFileDestinationOptions
Dim szFileName As String = "c:\windows\temp\myreport2.pdf"
dfdoCustomers.DiskFileName = szFileName
With bbreport
bbreport.SetParameterValue("Team", DropDownList1.SelectedItem.Value)
.ExportOptions.ExportDestinationType = _
CrystalDecisions.Shared.ExportDestinationType.DiskFile
.ExportOptions.ExportFormatType = _
CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
.ExportOptions.DestinationOptions = dfdoCustomers
.Export()
End With
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(szFileName)
Response.Flush()
Response.Close()
End Sub
Pretty basic, however I have an issue and I am thinking it's not uncommon or hard, I just don't know how to solve it. I want the user to be able to go back to the original form (The form that the user clicked the button to export the report since it's based on parameters and I want the user to be able to re-submit using new parameters). However, after the pdf is opened, the back button is not available to return to the form. I am thinking of two solutions, 1) open the pdf in a new window, or 2) somehow make it possible to return to the original form. Any thoughts?