Conditional Hyperlink

can I have a conditional hyperlink
fpinto765Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
edlunadConnect With a Mentor Commented:
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
 
edlunadCommented:
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
 
fpinto765Author Commented:
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 
edlunadCommented:
I think you forgot to include the equal sign(=) before the expression, I tested and it ran good. exp
0
 
fpinto765Author Commented:
hoiw can I compare null
if my field is null
0
 
edlunadCommented:
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
 
fpinto765Author Commented:
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
 
fpinto765Author Commented:
and I lost hand which howers on the hyperlink field.
0
 
edlunadCommented:
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
 
fpinto765Author Commented:
I can not click anymore in report server, hand is missing
0
 
fpinto765Author Commented:
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
 
fpinto765Author Commented:
perfect  edlunad
Thanks once again. do you help sql issues too?
0
 
edlunadCommented:
yeah I few, post a related question if you need help with something.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.