VB Crystal Report >> Problem using a binary stream to generate a PDF in Visual Studio .NET

by Oliviero Dall'Asta » Thu, 28 Apr 2005 17:49:29 GMT

I'm using this code to generate a DOC file with CR .NET and it's working
fine:

.........
Dim MyStream As System.IO.Stream

'MyStream = reportObject.ExportToStream(ExportFormatType.WordForWindows) '
for word type

MyStream = reportObject.ExportToStream(ExportFormatType.PortableDocFormat) '
for PDF

Response.ClearHeaders()

Response.ClearContent()

'Response.ContentType = "application/msword" ' for word type

Response.ContentType = "application/pdf" ' for PDF type

Dim MyBuffer(CType(MyStream.Length, Integer)) As Byte

MyStream.Read(MyBuffer, 0, CType(MyStream.Length, Integer))

Response.BinaryWrite(MyBuffer)

Response.End()



If I'm trying to generate a PDF files ( using commented lines) I've this
message error when Acrobat is starting on my client browser:

"Trovato token sconosciuto: '0,05'" ( in English,something like:
Unknow token found....)

What does it mean?

No problems generating DOC files !!

Thanks. Oliviero








Similar Threads

1. How do I generate or display crystal report in Visual Studio 2003 in excel, pdf, web - VB Crystal Report

2. Problem using VB 6.0 ActiveX controls in Visual Studio.NET

Is there a hotfix available for the following problem with ActiveX controls 
in Visual Studio.NET, If so what is the process for acquiring the hotfixes.

SYMPTOMS
In Microsoft Visual Studio .NET, when I try to add the Microsoft FlexGrid 
Control 6.0 ActiveX control (MSFLXGRD.OCX) to a (VisualBasic.net) form I 
receive the following error message:

" Failed to create component xxxxx, System.Component Model.Licence 
Exception: Must have a license to use this ActiveX control at System.xxxxx, 
etc,etc"

On searching the KB,a similar problem states that (see KB Article ID: 
884878) because Visual Studio .NET 2003 does not include a design-time 
license for some of the VB 6.0 ActiveX Controlss (eg. Microsoft Hierarchical 
FlexGrid Control 6.0 (OLEDB) ActiveX control) similar symptoms occur. 
Hotfixes are available for this control.   BTW . I do not have Visial Basic 
6.0  

3. Installation of Visual Studio .NET 2003 generates Internal Error

4. Visual Studio to Visual Studio.Net

Hi,
I'm just about ready to take the plunge. I use Visual 
Studio SP5 and must keep this so that current systems can 
be maintained. However I want to load and come up to speed 
with VS.Net. All I've read says I can load VS.Net onto the 
same machine as VS and they happily coexist.

What's the news from the trenches? Is this correct or 
should I get another server for VS.Net?

TIA Peter

5. Updates for VB, Visual Studio .Net 2003, Visual Studio 2005

6. using visual studio.net debugging for classic asp & Visual Basic.N

7. Deployment Problem- Windows application using Crystal Reports and Visual Studio - VB.Net