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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass UniqeID via hyperlink so no need for dropdownlist parameter 1

Status
Not open for further replies.

lanm

Programmer
Jul 7, 2005
244
US
Here's my situation:

I've got a hyperlink, and will append a uniqueID to the link in order to pull specific information so the user doesn't have to sift through 500+ IDs from a dropdownlist. They will be taken to the report server and automatically get information for a specific ID w/o using the dropdownlist.

I'm trying to look in my book, and it looks like the hyperlink's NavigateURL will be something like (my field would be PackageID):

"
Does this look correct?

I'm also having trouble setting the report parameter in order to use this value in the URL.

Thanks!
 
1) Where are you appending the uniqueID to the hyperlink, in the report itself, in the parameter setup or in a "third party" application that pulls up the report?

2) How are you trying to set up the report parameter and what errors are you running into?



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Catadmin,

The hyperlink is via some ASP.NET code w/in the application:

Dim strWPPID = Request.QueryString("WPPID").ToString()
HyperLink1.NavigateUrl = " & strWPPID & ""

**********

The SQL Query looks like:

SELECT * FROM WP_GInfo
WHERE (WP_GInfo.WP_PID = @WPPIDParam)

For @WPPIDParam, I've set it's expression as:
= Parameters!WPPIDParam.Value

Available Values are "Non-Queried"
Default Values are "None
 
You might want to check with the ASP forum to figure out how to append info to a hyperlink. I'm not to ASP savvy.

lanm said:
For @WPPIDParam, I've set it's expression as:
= Parameters!WPPIDParam.Value

Is the parameter name you're trying to set up in Report Parameters @WPPIDParam or WPPIDParam? If the former, you can't use the @ sign in the Report Parameters screen.

If you don't create your SQL Statement as a Stored Procedure and call it in RS with an "Exec spMyProc @WPPIDParam", you'll have to actually declare your variable before your SQL Statement. Like this:

Code:
Declare @WPPIDParam int

SELECT * FROM WP_GInfo
WHERE (WP_GInfo.WP_PID = @WPPIDParam)

Don't use a set statement, though you'll need to manually enter the parameter when you test the dataset. Then go into Report Parameters and you'll see a new parameter there. That's when you can set it up as need be. Usually, in this situation, you'll have 2 params. One that gets its info from a previous query OR from the user, then this param which will get its value from the other param.

Make sense?



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Catadmin,
The parameter name is "WPPIDParam" and not "@WPPIDParam"

Thanks!
 
Catadmin,

I wasn't using the TargetServerURL in the hyperlink URL. I was using another name for the same server. That was the issue. The URL that does work, though, now prompts for authentication to the server. We'll work through the security issues.

Thanks for you help! Gave ya a star!
 
Aha! Well, thanks for letting us know the solution. This might come in handy the next time someone has this problem.



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top