Stream in a new windows

Discussion in 'ASP General' started by Suedois, Feb 7, 2006.

  1. Suedois

    Suedois Guest

    Hi,

    I use a Crystal Report Viewer to export a report in PDF. This is done by a
    code behind procedure like this:
    private void ExportReport()
    {
    MemoryStream oStream = new MemoryStream() ;
    oStream = (MemoryStream)
    currentReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
    Response.Clear();
    Response.Buffer = true;
    Response.ContentType = "application/pdf";
    Response.BinaryWrite(oStream.ToArray());
    Response.End();
    }

    This work well and open a Acrobat reader into IE.

    What I want is that the report in PDF format appear into a new window. It
    seem to be impossible to communicatate between a window open from client side
    by JavaScript and a stream generated form code behind.

    Any suggestions are welcome.
    Suedois, Feb 7, 2006
    #1
    1. Advertising

  2. Suedois

    Evertjan. Guest

    =?Utf-8?B?U3VlZG9pcw==?= wrote on 07 feb 2006 in
    microsoft.public.inetserver.asp.general:

    > Hi,
    >
    > I use a Crystal Report Viewer to export a report in PDF. This is done
    > by a code behind procedure like this:
    > private void ExportReport()


    Is this classic ASP, I think not.
    If it is asp.net, please ask in a dotnet group.

    > {
    > MemoryStream oStream = new MemoryStream() ;
    > oStream = (MemoryStream)
    > currentReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.P
    > ortableDocFormat);
    > Response.Clear();
    > Response.Buffer = true;
    > Response.ContentType = "application/pdf";
    > Response.BinaryWrite(oStream.ToArray());
    > Response.End();
    >}
    >
    > This work well and open a Acrobat reader into IE.
    >
    > What I want is that the report in PDF format appear into a new window.
    > It seem to be impossible to communicatate between a window open from
    > client side by JavaScript and a stream generated form code behind.


    You should specify the window in the calling page, as ASP does not know
    about windows:

    <form target='_blank'>

    or

    <a href='..' target='_blank'>


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Feb 7, 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. Rasmusson, Lars
    Replies:
    1
    Views:
    693
    popov
    Apr 30, 2004
  2. Replies:
    9
    Views:
    605
    Alex Buell
    Apr 27, 2006
  3. Alexander Korsunsky

    get stream mode flags from an opened stream

    Alexander Korsunsky, Feb 17, 2007, in forum: C++
    Replies:
    1
    Views:
    435
    John Harrison
    Feb 17, 2007
  4. dolphin
    Replies:
    6
    Views:
    535
    Thomas Fritsch
    Mar 18, 2007
  5. mrstephengross
    Replies:
    3
    Views:
    387
    James Kanze
    May 10, 2007
Loading...

Share This Page