SSRS - Action: MailTo not working in Excel Export

Hello:

In my reports, I have a link that enables users to send me an email if they want to provide feedback.  This is done by using a "mailto:" expression in Action.

If the user clicks on the link in IE, the link functions correctly and Outlook will open up with my email address, the Subject I've specified, etc.

However, if the user exports the report to Excel and then clicks on thel link, a "Reference is not valid" error message gets thrown.  This is because the link automatically have file:///tempFileLocation/fileName -  appended to the beginning of the link.  Therefore it becomes something like "file:///tempFileLocation/fileName - mailto:emailAddress?subject=subjectName" etc.  

Why is the file location automatically appended to the beginning when the url is "mailto:"?  The other links will export and function correctly when exported to Excel.  However, any link with "mailto:" Action will not work when the report is exported to Excel.  What is the fix for this?

Thank you in advance!

February 10th, 2015 12:09am

Hi yosedesh,

According to your description, you create an action to open Outlook email. The action works fine in IE, but after exporting the report to an Excel file, the action cant work correctly.

In Reporting Services, when we create an expression and concatenate the MailTo: to the beginning of the field for the Go to URL option, the hyperlink will be changed after Excel render automatically. The hyperlink will add the name of exported Excel file at the beginning of the hyperlink like you mentioned. This is a by-design behavior. So in your scenario, if you want users to open outlook email via the hyperlink, you have to modify the hyperlink within the Excel file manually.

If you have any question, please feel free to ask.

Best regards,
Qiuyun Yu

Free Windows Admin Tool Kit Click here and download it now
February 10th, 2015 12:58pm

Hi Qiuyun:

Why is this by-design?

We expect users to be able to extract the data they need for their services through our SSRS reports.  We've taught them how to use parameters and export their reports to Excel.  However, our users are not technical enough to know how to modify the link within Excel manually and they shouldn't have to.

As the developer of the report, it is our job to ensure that the report functions correctly.  It seems like an error on our part if a hyperlink automatically add the location & name of the exported file simply because it is a "mailto:" link.

Are there plans to enable "mailto:" hyperlinks to export correctly to Excel (and possibly other files)?

Thank you for understanding.

February 10th, 2015 4:17pm

Hi,

You can export the report to a PDF file. In my environment, the mailto action can work in PDF file.

Hope it helps.

Free Windows Admin Tool Kit Click here and download it now
February 16th, 2015 11:28am

Hi,

You can export the report to a PDF file. In my environment, the mailto action can work in PDF file.

Hope it helps.

February 16th, 2015 11:28am

That's great that it'll work in PDF files.  However, our users need the files to export to Excel and the mailto links to function properly in Excel files.

Our users need to be able to extract our reports into Excel by themselves on a daily basis, and they should be able to use the mail links in the Excel file also. 

Are there plans for Microsoft to resolve this issue?

Thanks in advance!

Free Windows Admin Tool Kit Click here and download it now
May 4th, 2015 5:27pm

Hi yosedesh,

For this issue, I would suggest opening a case with Microsoft Customer Support Services (CSS) (http://support.microsoft.com), so that a dedicated Support Professional can assist you in a more efficient manner.

Best regards,
Qiuyun Yu

May 5th, 2015 2:24am

Thank you.  In case anyone else comes across this in the future, I've put this as part of the MS Connect Feedback:

https://connect.microsoft.com/SQLServer/feedback/details/1303533

  • Marked as answer by yosedesh Tuesday, May 05, 2015 10:44 PM
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2015 8:08pm

I have found that changing the mailto links by adding two slashes after the colon makes the export process know it is an absolute URL instead of a relative URL (where it adds the document location). Use mailto://test@example.com in your Action URL. I have successfully tested the links in both SSRS (on Internet Explorer, Firefox, and Chrome) and from exported Excel documents with both Lotus Notes and Microsoft Outlook email clients.
  • Proposed as answer by Zingiber 6 hours 30 minutes ago
July 15th, 2015 8:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics