How to send POST variables in my case?

Discussion in 'ASP .Net' started by Lars Netzel, Oct 19, 2004.

  1. Lars Netzel

    Lars Netzel Guest

    Hello!

    I have a button, in the click event I have this code:

    ----------------------------------------------------------------------------
    ----------------------------
    Response.Write("<script
    language=javascript>window.open('CrystalReports.aspx?FromDate=" &
    txtFromDate.Text & "&ToDate=" & txtToDate.Text & "&File=" &
    drpReports.SelectedValue & "');</script>")
    ----------------------------------------------------------------------------
    ----------------------------

    Due to a problem with Crystal reports.. I cannot send the Variables in the
    string and I need to Post them instead
    (here's why if you need to know:
    http://support.businessobjects.com/library/kbase/articles/c2011964.asp)

    How do I POST variables to a page that needs top be opened as a new window
    from the VB code?

    Best regards/
    Lars
    Lars Netzel, Oct 19, 2004
    #1
    1. Advertising

  2. Dim sScript As String = ""
    Dim StrBaseQueryString As String
    StrBaseQueryString = "frmRptForm.aspx?RptName=aReport&Paramid=" &
    cbXXX.SelectedItem.Value & "&OUTPUT=SCREEN"
    sScript &= "<script language=javascript>"
    sScript &= "window.open('" & StrBaseQueryString
    "','Report','directories=no,titlebar=yes,location=no,scrollbars=yes,resizable=yes,top=0,left=0,outerHeight='
    + screen.availHeight + ',outerWidth=' + screen.availWidth );"
    sScript &= "</script>"
    Response.Write(sScript)


    pls go through the above code, we had tried this more than 100 places and
    everywhere it is working smoothly. we are calling our report from out ASP.Net
    application and Based of the last parameter i.e OUTPUT can be either SCREEN,
    PDF, DOC we have tested all these and working well.. pls let me know the
    status

    thank you



    "Lars Netzel" wrote:

    > Hello!
    >
    > I have a button, in the click event I have this code:
    >
    > ----------------------------------------------------------------------------
    > ----------------------------
    > Response.Write("<script
    > language=javascript>window.open('CrystalReports.aspx?FromDate=" &
    > txtFromDate.Text & "&ToDate=" & txtToDate.Text & "&File=" &
    > drpReports.SelectedValue & "');</script>")
    > ----------------------------------------------------------------------------
    > ----------------------------
    >
    > Due to a problem with Crystal reports.. I cannot send the Variables in the
    > string and I need to Post them instead
    > (here's why if you need to know:
    > http://support.businessobjects.com/library/kbase/articles/c2011964.asp)
    >
    > How do I POST variables to a page that needs top be opened as a new window
    > from the VB code?
    >
    > Best regards/
    > Lars
    >
    >
    >
    >
    >
    >
    =?Utf-8?B?UHJhc2FudGggUmF2ZWVuZHJhbg==?=, Oct 19, 2004
    #2
    1. Advertising

  3. Lars Netzel

    Cirrosi Guest

    You can create a page to whom you can pass parameters on querystring.
    In that page you can dinamically create a field for each parameter of
    querystring an than you can Response.Transfer to your report page.

    "Lars Netzel" <[stop_spam]@host.topdomain> ha scritto nel messaggio
    news:...
    > Hello!
    >
    > I have a button, in the click event I have this code:
    >
    > ----------------------------------------------------------------------------
    > ----------------------------
    > Response.Write("<script
    > language=javascript>window.open('CrystalReports.aspx?FromDate=" &
    > txtFromDate.Text & "&ToDate=" & txtToDate.Text & "&File=" &
    > drpReports.SelectedValue & "');</script>")
    > ----------------------------------------------------------------------------
    > ----------------------------
    >
    > Due to a problem with Crystal reports.. I cannot send the Variables in the
    > string and I need to Post them instead
    > (here's why if you need to know:
    > http://support.businessobjects.com/library/kbase/articles/c2011964.asp)
    >
    > How do I POST variables to a page that needs top be opened as a new window
    > from the VB code?
    >
    > Best regards/
    > Lars
    >
    >
    >
    >
    >
    Cirrosi, Oct 19, 2004
    #3
  4. Lars Netzel

    bruce barker Guest

    you add a html from with a target to the new window.

    <form name=report action="'CrystalReports.aspx" method="post"
    target="_blank">
    <input type=hidden name=FromDate value="<%=txtFromDate.Text%>">
    <input type=hidden name=ToDate value="<%=txtToDate.Text%">
    <input type=hidden name=File value="<%=drpReports.SelectedValue%">
    </form>

    <script>
    document.report.submit();
    </script>

    note: because there is valid viewstate, the IsPostback will not be set.

    -- bruce (sqlwork.com)


    "Lars Netzel" <[stop_spam]@host.topdomain> wrote in message
    news:...
    > Hello!
    >
    > I have a button, in the click event I have this code:
    >
    > --------------------------------------------------------------------------

    --
    > ----------------------------
    > Response.Write("<script
    > language=javascript>window.open('CrystalReports.aspx?FromDate=" &
    > txtFromDate.Text & "&ToDate=" & txtToDate.Text & "&File=" &
    > drpReports.SelectedValue & "');</script>")
    > --------------------------------------------------------------------------

    --
    > ----------------------------
    >
    > Due to a problem with Crystal reports.. I cannot send the Variables in the
    > string and I need to Post them instead
    > (here's why if you need to know:
    > http://support.businessobjects.com/library/kbase/articles/c2011964.asp)
    >
    > How do I POST variables to a page that needs top be opened as a new window
    > from the VB code?
    >
    > Best regards/
    > Lars
    >
    >
    >
    >
    >
    bruce barker, Oct 19, 2004
    #4
    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. Steve Franks
    Replies:
    2
    Views:
    1,235
    Steve Franks
    Jun 10, 2004
  2. Tee
    Replies:
    3
    Views:
    7,767
    Herfried K. Wagner [MVP]
    Jun 23, 2004
  3. Janice

    lower case to upper case

    Janice, Dec 10, 2004, in forum: C Programming
    Replies:
    17
    Views:
    1,156
    Richard Bos
    Dec 14, 2004
  4. roN

    send post variables

    roN, Aug 11, 2006, in forum: Javascript
    Replies:
    1
    Views:
    87
    Randy Webb
    Aug 11, 2006
  5. Tom Lobato

    Modify POST variables before to send

    Tom Lobato, Jun 11, 2007, in forum: Javascript
    Replies:
    6
    Views:
    91
    Randy Webb
    Jun 11, 2007
Loading...

Share This Page