D
David Dvali
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.PortableDocFormat);
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.
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.PortableDocFormat);
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.