Solved

Conditional Hyperlink

Posted on 2011-09-19
13
387 Views
Last Modified: 2012-08-13
can I have a conditional hyperlink
0
Comment
Question by:fpinto765
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 9

Expert Comment

by:edlunad
ID: 36561356
You can do something like this...

=IIF(Fields!YourField.Value > 1, "http://google.com", "http://yahoo.com")

just use it under Action > Go to URL of your Texbox Properties
0
 

Author Comment

by:fpinto765
ID: 36561595
IIF(Fields!CustCount.Value > 1, "http://google.com", "http://yahoo.com")
but I am getting this error
Invalid URI : The URI scheme is not valid
0
 
LVL 9

Expert Comment

by:edlunad
ID: 36561636
I think you forgot to include the equal sign(=) before the expression, I tested and it ran good. exp
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:fpinto765
ID: 36561996
hoiw can I compare null
if my field is null
0
 
LVL 9

Expert Comment

by:edlunad
ID: 36562283
You can try to nest a couple of IIFs like this...

=IIF(IsNothing(Fields!CustCount.Value), "http://google.com",IIF(Fields!CustCount.Value > 1, "http://msn.com", "http://yahoo.com"))
0
 

Author Comment

by:fpinto765
ID: 36562458
I am getting error when I add java script to open in anohter window

=IIF( Fields!concnt.Value > 1, "javascript:void(window.open("http://linkadmin/Customer/CustomerDetails.asp?EID=0&CustCD=" & Fields!CustCD.Value & "','_blank'))", "javascript:void(window.open("http://linkadmin/Customer/CustomerDetails.asp?ID=0&EID=170&chkActiveCustomer=2 &CUSTCD= " & Fields!CustCD.Value & "','_blank'))")
0
 

Author Comment

by:fpinto765
ID: 36562809
and I lost hand which howers on the hyperlink field.
0
 
LVL 9

Expert Comment

by:edlunad
ID: 36562852
I think you need to double quote every quote you use inside the IIF result text, like this...

=IIF( Fields!concnt.Value > 1, "javascript:void(window.open(""http://google.com"")", "javascript:void(window.open(""http://yahoo.com"")")
0
 

Author Comment

by:fpinto765
ID: 36562956
I can not click anymore in report server, hand is missing
0
 

Author Comment

by:fpinto765
ID: 36562982
I tried this
=IIF( Fields!concnt.Value > 1, "javascript:void(window.open(""http://google.com"")", "javascript:void(window.open(""http://yahoo.com"")")
as it is
but I lost hand which howers on the hyperlink field.
0
 
LVL 9

Accepted Solution

by:
edlunad earned 500 total points
ID: 36564088
The correct syntax for the link is with single quotes, like this...

=IIF( Fields!concnt.Value > 1, "javascript:void(window.open('http://google.com')", "javascript:void(window.open('http://yahoo.com')")
0
 

Author Closing Comment

by:fpinto765
ID: 36567460
perfect  edlunad
Thanks once again. do you help sql issues too?
0
 
LVL 9

Expert Comment

by:edlunad
ID: 36568590
yeah I few, post a related question if you need help with something.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you'll probably know, a data region in a SQL Server Reporting Services report can be linked to only one dataset.  This makes it troublesome when you need to display data from more than one dataset in the same data region.  SQL Serve…
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question