473,383 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Unable to render PDF that is compatible with v5

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("cry staluser"),
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..
Jul 21 '05 #1
2 1473
Use a browser other than IE5.x. Thre are known problems with this POS and
trying to doing anything remotely productive.

Bob Lehmann

"[Alan Flores]" <Al********@discussions.microsoft.com> wrote in message
news:21**********************************@microsof t.com...
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("cry staluser"),
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..

Jul 21 '05 #2
thanks bob.
so the acrobat reader version has nothing to do with it??

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

Bob Lehmann

"[Alan Flores]" <Al********@discussions.microsoft.com> wrote in message
news:21**********************************@microsof t.com...
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("cry staluser"),
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..


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jame Johnson | last post by:
I'm running FreeBSD 4.10 stable. I upgraded to php 5.03. Now when I run php I get the following types of messages: PHP Warning: PHP Startup: Unable to load dynamic library...
0
by: FabFreddy | last post by:
Hi, I can't find out what the problem is with the error message below! I get it when I go from one to another page with controls in these pages. Anyone knows??? THX Unable to validate...
0
by: Steve Chatham | last post by:
I am stuck on this. It ought to be a simple reason as to why this is problematic, in that it works on smaller groups of data (say under 40 records), but doesn't on larger groups of records (40+)....
1
by: A Traveler | last post by:
Hello, i am having this problem. The exact error message is: "Unable to generate code for a value of type 'System.Web.UI.Page'. This error occurred while trying to generate the property value for...
6
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file =...
5
by: sjl | last post by:
I've got an .aspx webform for searching my database. It basically takes user input and passes it as a parm into a stored proc to search a table. The results are returned in a SQLDataReader and...
4
by: Mike Fellows | last post by:
running IIS on a single server, hosting pages on an intranet basis, one single user out of 50 is having an unable to validate data issue how do i fix this (the microsoft KB is a little...
2
by: prasadrmarathe | last post by:
Hi, I have created one custom buton server control which will shown on it the nuber of time it was clicked as its text. I have added the custom control in my another projects tool box but i...
6
by: Solje | last post by:
Im developing an ASP.NET application used for maintinance purpose and it may be idle for some ours. The application crash with the error shown below when the user click on some contol in the...
2
by: =?Utf-8?B?S2VybWl0?= | last post by:
Can anyone please tell me if Anvsoft DVD Photo Slideshow is compatible with Microsoft Vista? It used to work fine with Windows XP, but when I try to open it in Vista I receive the following...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.