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

Discussion in 'ASP .Net' started by Learner, Jan 23, 2006.

  1. Learner

    Learner Guest

    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
    Learner, Jan 23, 2006
    #1
    1. Advertising

  2. I believe you should be use RichText instead of WordforWindows as your
    ExportFormatType.
    --
    Christopher A. Reed
    "The oxen are slow, but the earth is patient."

    "Learner" <> wrote in message
    news:...
    > 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
    >
    Christopher Reed, Jan 25, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon
    Replies:
    0
    Views:
    2,020
    Simon
    Jul 9, 2003
  2. Mustufa Baig

    How to display crystal report via webform..

    Mustufa Baig, May 13, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,957
    Lucas Tam
    May 13, 2005
  3. Learner
    Replies:
    0
    Views:
    707
    Learner
    Jan 19, 2006
  4. Comfort
    Replies:
    0
    Views:
    545
    Comfort
    Oct 18, 2004
  5. Tony
    Replies:
    2
    Views:
    287
Loading...

Share This Page