Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Conditional Hyperlink

Posted on 2011-09-19
13
Medium Priority
?
410 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Loops Section Overview

783 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