Solved

Conditional Hyperlink

Posted on 2011-09-19
13
357 Views
Last Modified: 2012-08-13
can I have a conditional hyperlink
0
Comment
Question by:fpinto765
  • 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
 

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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Written by Valentino Vranken. A while ago I wrote an article called Chart Optimization Tips (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Chart-Optimization-Tips.html).  This article explained how …
A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now