Conditional Hyperlink

can I have a conditional hyperlink
fpinto765Asked:
Who is Participating?
 
edlunadCommented:
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
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
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.