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

Problem with 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 1024

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

Similar topics

0
by: s-galit | last post by:
hi, i have a formula parameter in my crystalReport how can i initalize the parameter so that in every line in the crystalReport the parameter will have a different string? how to get to line in...
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...
3
by: redneon | last post by:
I've populated a DataSet in my C# program and verified that it contains the data I passed it. I've then created a blank CrystalReport and set it's DataSource to my DataSet. Then I created a...
1
by: Jason Huang | last post by:
Hi, Would someone tell me how to open a CrystalReport in my ASP.Net C#? We can use the Show method to open a windows form, but what method should we use for opening a CrystalReport? Thanks for...
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...
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
1
by: mhsasono | last post by:
Hi all, Has anybody experienced with CrystalReport? My question is: Does CrystalReport have capability to print the Microsoft Word document? Reason: I want to know CrystalReport capability...
0
by: amri | last post by:
How to define CrystalReport object in ASP.NET ? I take a CrystalReportViewer & CrystalReportSource........& their name is in CrystalReport is respectively CrystalReportViewer1 & ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.