468,765 Members | 1,729 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

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 875

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by s-galit | last post: by
2 posts views Thread by Vlatko | last post: by
3 posts views Thread by redneon | last post: by
1 post views Thread by Jason Huang | last post: by
2 posts views Thread by Don Wash | last post: by
1 post views Thread by Mustufa Baig | last post: by
2 posts views Thread by Franck | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.