473,394 Members | 1,802 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,394 software developers and data experts.

Exporting CrystalReport into PDF from web application

Hello.

I have some strange problem and will be very thankful if anybody will help
me to solve it.
In my ASP.NET web form I have used CrystalReport to produce some report, now
I want to export this report into PDF without saving any temporary file on
server disk.
I'm using such code:
P.S. At moment when this code is running I already have "crReportDocument"
created and assigned all required parameters to it.

================================================== ======
MemoryStream memoryStream;
memoryStream = (MemoryStream)crReportDocument.ExportToStream(
CrystalDecisions.Shared.ExportFormatType.PortableD ocFormat);
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
================================================== ======

And now there is a problem:
When I export it the web browser is trying to open it in Acrobat Reader, but
Acrobat Reader shows error message "An unrecognized token"0,5" was found"
and the pages are blank (by the way the pages count is correct).
Also the strange fact is, that when I'm exporting to Excel with the same
method it works fine.
What I'm doing wrong and how can I solve this problem?

Thank you.






Nov 19 '05 #1
0 1080

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

Similar topics

0
by: hockeyove | last post by:
Hi! Little help needed... This is my environment: Server: Windows 2003 Client: Windows 2000 and Windows XP
2
by: Vlatko | last post by:
I have made a simple application in C# that prints a txt file using CrystalReport. On my PC everything works fine but when I run my app on another PC it collapses. I get message: "Cannot find...
2
by: Don Wash | last post by:
Hi All! I've been searching everywhere for a simple sample of producing a bar graph using CrystalReport by specifying SQL Query, and I've found none of it! I find so many complex samples with so...
1
by: Mustufa Baig | last post by:
I have an ASP.NET website where I am showing off crystal reports to users by exporting them to pdf format. Following is the code: ---------------- 1 Private Sub ExportReport() 2 Dim oStream...
0
by: David Dvali | last post by:
Hello. I have some strange problem and will be very thankful if anybody will help me to solve it. In my ASP.NET web form I have used CrystalReport to produce some report, now I want to export...
0
by: David Dvali | last post by:
Hello. I'm exporting CrystalReport into some formats, whne I export to Excel or PDF it works fine, but when I export it in HTML it shows me the error: ...
2
by: Franck | last post by:
Hello, has anyone found a way of exporting the datagrid content into pdf I have look through many examples for excel, word and so on... but nothing for pdf. any helps please? Franck
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: 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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.