Unable to render PDF that is compatible with v5

G

Guest

Hi.

I am rendering a pdf file from an aspx page. The problem is if the user has
an earlier version of adobe acrobat reader (specifically v 5), the report
shows as blank pdf file. But if you use v 6.0, everything is great. Is there
a workaround with this ? Here is my sample code ...

Dim crReportDocument As ReportDocument
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
Dim Fname As String

crReportDocument = New ReportDocument
crReportDocument.Load(Server.MapPath("../reports/clientdetails.rpt"))
crReportDocument.SetDatabaseLogon(Application("crystaluser"),
Application("crystalpass"))

crReportDocument.SetParameterValue("@programid",
Session("thisprogid"))
crReportDocument.SetParameterValue("@clientid",
Request.QueryString("cid"))

Fname = Server.MapPath("pdf\" & Request.QueryString("cid") & ".pdf")

crDiskFileDestinationOptions = New DiskFileDestinationOptions
crDiskFileDestinationOptions.DiskFileName = Fname
crExportOptions = crReportDocument.ExportOptions
With crExportOptions
.DestinationOptions = crDiskFileDestinationOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat
End With
crReportDocument.Export()
crReportDocument = Nothing
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(Fname)
Response.Flush()
Response.Close()

System.IO.File.Delete(Fname)

Any help or advice or comments will be appreciated..
 
B

Bob Lehmann

Use a browser other than IE5.x. Thre are known problems with this POS and
trying to doing anything remotely productive.

Bob Lehmann
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top