D
David Lozzi
Howdy,
I have a web application that is using Crystal Reports which get converted
to PDF for viewing. Works great on the production server. I have since
installing the app reloaded my development machine and now they don't
display on my machine. I don't get any errors, just a plain white screen.
Its been about 2 years since I worked on this application and now they need
updates and I forget how to view a crystal report as a PDF on my
workstation. Please help!
The script I'm using to convert to PDF is
Dim crReport As New rptCustomerQuote
Dim woid As Integer = Request("WOID")
Dim ds As New DataSet
Dim conn As New SqlConnection(ConnectionString)
Dim adap As New SqlDataAdapter("cp_FrmCustomerQuote", conn)
With adap
..SelectCommand.CommandType = CommandType.StoredProcedure
..SelectCommand.Parameters.Add(New SqlParameter("@WOID", woid))
End With
adap.Fill(ds, "cp_FrmCustomerQuote")
crReport.SetDataSource(ds)
'Change the output stream of the current form
Dim strStream As New
System.IO.BinaryReader(crReport.ExportToStream(CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat))
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.BinaryWrite(strStream.ReadBytes(strStream.BaseStream.Length))
Response.Flush()
Response.Close()
conn.Close()
Thanks,
David Lozzi
I have a web application that is using Crystal Reports which get converted
to PDF for viewing. Works great on the production server. I have since
installing the app reloaded my development machine and now they don't
display on my machine. I don't get any errors, just a plain white screen.
Its been about 2 years since I worked on this application and now they need
updates and I forget how to view a crystal report as a PDF on my
workstation. Please help!
The script I'm using to convert to PDF is
Dim crReport As New rptCustomerQuote
Dim woid As Integer = Request("WOID")
Dim ds As New DataSet
Dim conn As New SqlConnection(ConnectionString)
Dim adap As New SqlDataAdapter("cp_FrmCustomerQuote", conn)
With adap
..SelectCommand.CommandType = CommandType.StoredProcedure
..SelectCommand.Parameters.Add(New SqlParameter("@WOID", woid))
End With
adap.Fill(ds, "cp_FrmCustomerQuote")
crReport.SetDataSource(ds)
'Change the output stream of the current form
Dim strStream As New
System.IO.BinaryReader(crReport.ExportToStream(CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat))
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.BinaryWrite(strStream.ReadBytes(strStream.BaseStream.Length))
Response.Flush()
Response.Close()
conn.Close()
Thanks,
David Lozzi