473,406 Members | 2,619 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,406 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 1475
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...
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
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.