Search code examples
urlreporting-servicesactionssrs-2008-r2mailto

SSRS 2008 R2 URL Action Link for Outlook Message


I have a go to action url in SSRS 2008 as expression so it opens outlook with a message:

="mailto:" & "emailaddress@here" & "?subject=" & "Project Name " & 
Fields!ReferenceNo.Value & "&body=" & "Hi All," + vbcrlf + 
"Please review your outstanding task/s please for " & 
Fields!ReferenceNo.Value & "." & vbcrlf & "Thank you" & vbcrlf & 
"http://sql01/reportserver?%Folder1%2fReport1&rs:Command=Render&Ref=" & 
Fields!ReferenceNo.Value 

The email message displays ok but will not display the url link with the correct Fields!ReferenceNo.Value appended. It appears to stop at Report1 without appending the

enter image description here

If I run the link separate from the message body,manually enter a reference, or exclude the expression from starting with mailto it works. It's simply when I try to append the Fields!ReferenceNo.Value that it doesn't work.


Solution

  • Try escaping your url:

    ="mailto:" & "emailaddress@here" & "?subject=" & "Project Name " & 
    Fields!ReferenceNo.Value & "&body=" & "Hi All," + vbcrlf + 
    "Please review your outstanding task/s please for " & 
    Fields!ReferenceNo.Value & "." & vbcrlf & "Thank you" & vbcrlf & 
    System.Uri.EscapeDataString("http://sql01/reportserver?%Folder1%2fReport1&rs:Command=Render&Ref=") & 
    Fields!ReferenceNo.Value