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!

Jumping to different reports

Status
Not open for further replies.

timfoster

Programmer
Dec 19, 2002
110
GB
I have a report that has a hyperlink jump to another report. This works fine, but I want to jump to a different depending on the value of a field. The link is a referrals report. If there is a single referral then I want to jump to that specific referral, if there are more than one I want to jump to a list for the punter to choose the one they want to look at.

I know this requires an expression but when I try:
=IIF(Fields.ReferralCount.value = 1, Referral, AllReferrals)
I get an error. Obviously, I'm passing the correct parameter through to the second report, but nothing doing.

Any help would be appreciated.
 
I've tried something similar in the past, and was never able to get it to work. One work around would be to have two report hyperlinks pointing to the two different reports. Hide or show them based on your criteria.
 
I've managed to resolve this now, in a roundabout way.

The link simply needs to include the report names in quotes. However, the difficulty was with the parameters. Both reports take a parameter, but they are different. One is a person ID (i.e. all referrals for a person) and the other a referral ID.

I had to change the parameter name in both reports to be the same name, so they now both take a parameter of ID. This way I can pass the value as ID regardless of which report I'm passing it to. It's not perfect, I'd rather pass a variable of @personid or @refid, but I can't find a way to set the parameter name as an expression.

If anyone has any ideas, I'd be grateful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top