SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Enable / Disable Hyperlink Action of TextBox Based on Value


Enable / Disable Hyperlink Action of TextBox Based on Value

Author
Message
ezytime
ezytime
SSC Veteran
SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)

Group: General Forum Members
Points: 218 Visits: 377
kabolick (1/20/2009)
When there is a value, I want the hyperlink action to be enabled, if there is not a value I want to disable the hyperlink action so that the user doesn't click to a report that has no data.


Using the following construct as an expression in Jump To Report works for me:
=IIF(Sum(Fields!CellValue.Value) Is Nothing,Nothing,"Detail Report")

This way the hyperlink cursor never shows on mouseover for a blank cell; it has the effect of disabling any Action.
VALEK
VALEK
Mr or Mrs. 500
Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)

Group: General Forum Members
Points: 576 Visits: 462
Nate Neufeld (5/19/2009)
kabolick (1/20/2009)
When there is a value, I want the hyperlink action to be enabled, if there is not a value I want to disable the hyperlink action so that the user doesn't click to a report that has no data.


Using the following construct as an expression in Jump To Report works for me:
=IIF(Sum(Fields!CellValue.Value) Is Nothing,Nothing,"Detail Report")

This way the hyperlink cursor never shows on mouseover for a blank cell; it has the effect of disabling any Action.


I was just about to whinge about that RS does not have this feature. NOTHING is what will save you...

Thanks for the tip. The trick with the hiding unhiding overlapping cells, as someoe suggested, brought me troubles in the end with export to PDF/EXCEL. It won't render the same as into HTML, which made me remove the feature. I almost said to the customers that it is not possible to remove 'empty click', before I saw your post. I will try it tomorrow and we will see if it works.

Thanks anyways.

VAL

M.Sc.IT, M.B.A, MCTS BI 2008, MCITP BI 2008, MCTS SQL Dev, CSM, CDVDM
BeverleyM
BeverleyM
Valued Member
Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)Valued Member (64 reputation)

Group: General Forum Members
Points: 64 Visits: 58
TKD-BB: Thanks, I had the same question and your two-textboxes method solved it nicely!

Edit: Then I noticed page two of this thread, saw the problem with Excel export and changed it to
=IIF(Fields!ResourceType.Value) <>"Mobile Resource",Nothing,"Mobile Resource Cost Summary")

:-D

Thanks all!
gil.eiliya
gil.eiliya
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 40
hi.

there is a simple solution for your problem, just use an IIF and a "false" value, just like the next example i used for my report for disabling the hyperlink.

=iif(Fields!UpTo24H_Count.Value<>0,"desired_report", false)

"desired_report" is the name of the report you want to go to using the hyperlink, you
can use this example for a lot of things, i used it to disable the tooltip i added to the hyperlink,
and the same for the underlined property i added to the text in the font properties.

good day.
gil eiliya
abhinay.kumar
abhinay.kumar
SSC Rookie
SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)

Group: General Forum Members
Points: 39 Visits: 41
I solved this by using the following expression
=IIF(Cint(Fields!Field1.Value) > 0,"ReportName/URL",nothing)
edmebart
edmebart
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 3
adding a "=IF(NOT(MyFields.Value Is Null),'http://xxxxx', nothing)"

to disable the action you need to set it to NOTHING
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search