473,320 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to send POST variables in my case?

Hello!

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

----------------------------------------------------------------------------
----------------------------
Response.Write("<script
language=javascript>window.open('CrystalReports.as px?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/l...s/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

Nov 18 '05 #1
3 1810
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,outer Height='
+ 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.as px?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/l...s/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


Nov 18 '05 #2
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:ex**************@TK2MSFTNGP09.phx.gbl...
Hello!

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

----------------------------------------------------------------------------
----------------------------
Response.Write("<script
language=javascript>window.open('CrystalReports.as px?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/l...s/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


Nov 18 '05 #3
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:ex**************@TK2MSFTNGP09.phx.gbl...
Hello!

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

-------------------------------------------------------------------------- -- ----------------------------
Response.Write("<script
language=javascript>window.open('CrystalReports.as px?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/l...s/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


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Armin | last post by:
It doesnt work to send data (simple text). I tryed everything (..i know) in httpd.conf and in php.ini. Has somebody a tipp for me? My system is Morphix (Debian) Apache 1.3 (tryed also...
3
by: Kassam | last post by:
Hi MVPs out there. I have constructed an order form and the users will enter the informtion. I now need to send the filled out form as an e-mail (body being the HTML with the fille din data) to...
2
by: Ronny Sigo | last post by:
Hello all, I a struggling for a few days now to find a way to send automated mail. I succeeded except that MS Outlook always gives me those 2 stupid warnings that 1) a "program tries to get...
3
by: ME | last post by:
Hi; I am getting "Unhandled Exception: System.Net.WebException: The remote server returned an erro r: (401) Unauthorized." when I am trying to get a page via post. Code follows...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
2
by: roN | last post by:
Hi, how can I send post variables from out of a php script to another script? I need to send some post var to a third party script, but would like to insert our own php script between the...
4
by: Thomas Eichner | last post by:
Hi, does anybody know a public website which offers a service that displays all data send by a browser (or an app calling the website), especially HTTP GET and POST data, browser data etc.? I...
0
by: zechdc | last post by:
I have been at this for two weeks now. I am trying to send two variables from a flash file located on newgrounds.com, kongregate.com, armorgames.com or any other site like that to a php file on my...
1
by: deepaks85 | last post by:
Dear All, I want to send some data through a form with Multiple attachment in an HTML Format. I have tried it but it is not working for me. I am able to send data without attachment but with the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.