SSRS field as http link
I have a SSRS report which displays some data fields as http links. Sometimes there is no value (it is blank) but it still creates a http link.
So in the TextBox properties of the field I have this expression set under Action -> Go to URL
="http://myserver:Id@@" & Fields!IDNo.Value
That works just fine when there is a value but how can I tell it to ignore creating the http link when the IDNo.Value is blank or null?
You need an expression that sets the URL as Nothing for values you don't want to use as URLs.
So in your example you can use an expression under Select URL:
=IIf(Not IsNothing(Fields!IDNo.Value) And Fields!IDNo.Value <> "" , "http://myserver:Id@@" & Fields!IDNo.Value , Nothing)
i.e. only add a URL to the textbox if the row field is not null and is not blank.
Try this :-
=IIf(IsNothing(Fields!IDNo.Value), False, "http://myserver:Id@@" & Fields!IDNo.Value)