Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a parameter to a ASP to create another URL

Status
Not open for further replies.

njitter

Technical User
Sep 4, 2001
122
US
Hello,

i'm using an application to pass a parameter to a Crystal Reports file

The problem is that the application that creates this string has a limit on the length of the string.

I would like to create a ASP file (show.asp) that will take the ID (BAG0001) as a parameter and refresh the page with the correct URL (shown below)

so show.asp?id=BAG0001 should come up with the string below and open the report in a Window.

Code:
[URL unfurl="true"]http://cals/obeliks/crystal/agreements.rpt&user0=crystal_group6&password0=crystal&user0@subarticle.rpt=crystal_group6&[/URL]
password0@subarticle.rpt=crystal&user0@subitems.rpt=crystal_group6&password0@subitems.rpt=crystal&prompt0=BAG0001

I have no need to hide the username and passwords, it's just that the application is not able to create such a long string.

Anyone got a suggestion??

---
It's never too late to do the Right thing
 
You could probably do a page with just a Response.Redirect and concatenate everything together:
Code:
<%
Option Explicit

Dim id
id = Request.QueryString(&quot;prompt0&quot;)

Response.Redirect &quot;[URL unfurl="true"]http://cals/obeliks/crystal/agreements.rpt&user0=crystal_group6&password0=crystal&user0@subarticle.rpt=crystal_group6&[/URL]
password0@subarticle.rpt=crystal&user0@subitems.rpt=crystal_group6&password0@subitems.rpt=crystal&prompt0=&quot; & id
%>

You could move any non-static argument to this page, provide you can pass them here in the querystring.

-Tarwn
 
Tarwn,

works almost except for the fact that the ID is not added to the string.. I changed the option to response.write to see what happenend..

i used
Code:
<%
Option Explicit

Dim id
id = Request.QueryString(&quot;prompt0&quot;)

Response.write &quot;[URL unfurl="true"]http://cals/obeliks/crystal/agreements.rpt?user0=crystal_group6&password0=crystal&user0@subarticle.rpt=crystal_group6&password0@subarticle.rpt=crystal&user0@subitems.rpt=crystal_group6&password0@subitems.rpt=crystal&prompt0=&quot;[/URL] & id
%>

gives

Code:
[URL unfurl="true"]http://cals/obeliks/crystal/agreements.rpt?user0=crystal_group6&password0=crystal&user0@subarticle.rpt=crystal_group6&password0@subarticle.rpt=crystal&user0@subitems.rpt=crystal_group6&password0@subitems.rpt=crystal&prompt0=[/URL]

as output...

Some stupid mistake on my side i suppose...







---
It's never too late to do the Right thing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top