Need help - Trying to convert a crystal report to a .rtf file from my webform

L

Learner

HI Friends,
I am brand new to creating Crystal reports. But overcomed a lot of
problems and so far happy what i could accomplish, calling a stored
proc with a parameter in it. And i can see the results in the Crystal
Reports in the front. Our client would like to be exported to a .rtf
file when an Export button is clicked on. I have no problem exporting
it to(actually there was a problem converting to .pdf or Excel, it goes
to the Exception block but i never had a chance to debug and find out
what the ex is!! but i still get the pdf document.I thought, OK some
thing is better than nothing) creating pdf / excel . But our client is
interested in to be abole to migrated it to a .rtf file rather. I get
the same message in a message box. A popping up a message box asking me
to open or save or cancel a .aspx page???!!!!

I am just wondering if some body had the same problem like i did.

Here is my code
***************************
Dim Stream As New MemoryStream

Stream =
rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.WordForWindows)

Response.Clear()

Response.Buffer = True

Response.ContentType = "application/rtf"

Response.BinaryWrite(Stream.ToArray())

Response.End()

***************************
Tahanks in advance.
-L
 
C

Christopher Reed

I believe you should be use RichText instead of WordforWindows as your
ExportFormatType.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top