简体   繁体   English

SSRS 报告中的 Mailto 链接

[英]Mailto Link within SSRS report

So as the title really, I can't seem to get it to work, it works if I only include one email in the TO: field however I need two.所以正如标题一样,我似乎无法让它工作,如果我只在 TO: 字段中包含一个 email 但我需要两个,它就可以工作。 I have a table with all the reports we own and it has two fields, owner and deputy owner and I want to create a hyperlink which emails both of these recipients if there are any queries which the user can click and then it already populates the owners of the report and their email addresses in the To: field, however there are more than one owner which is the issue I am facing.我有一个包含我们拥有的所有报告的表格,它有两个字段,所有者和副所有者,我想创建一个超链接,如果用户可以单击任何查询,然后它已经填充了所有者报告及其 email 地址在 To: 字段中,但是我面临的问题不止一个所有者。

I tried joining the two fields together and adding a semicolon between them, I tried adding a comma also.我尝试将两个字段连接在一起并在它们之间添加分号,我也尝试添加逗号。 This didn't work and I've tried to add them in separately.这不起作用,我尝试单独添加它们。

Please Help!请帮忙!

My Fields.Owner.Value is set to for example jb@123;com.pj@123.com我的 Fields.Owner.Value 设置为例如 jb@123;com.pj@123.com

Any ideas?有任何想法吗?

This is my expression:这是我的表达:

="mailto:" & First(Fields!owner.Value, "DataSet2") & "?subject=" & First(Fields!report.Value, "DataSet2") & "&cc=" & First(Fields!dev_ib.Value, "DataSet2")

I have also tried我也试过

="mailto:" & First(Fields!owner.Value, "DataSet2") & ";" & First(Fields!owner2.Value, "DataSet2") & "?subject=" & First(Fields!report.Value, "DataSet2") & "&cc=" & First(Fields!dev_ib.Value, "DataSet2")

EDIT: I've seen people say it is not possible to have more than one To: recipient in SSRS, can anyone confirm if this is still true, if so I will give up I guess....编辑:我见过人们说在SSRS中不可能有多个收件人:收件人,谁能确认这是否仍然是真的,如果是这样,我想我会放弃......

Use Javascript使用 Javascript

I hadn't been able to get the mailto to work with multiple addresses with a comma or semi-colon - it gives an rsInvalidURLProtocol error.我无法让 mailto 使用逗号或分号的多个地址 - 它给出了 rsInvalidURLProtocol 错误。

But if I use javascript, it does work.但如果我使用 javascript,它确实有效。

="javascript:void(window.open('mailto:" & First(Fields!owner.Value, "DataSet2") & ";" & First(Fields!owner2.Value, "DataSet2") & "'))"

在此处输入图像描述

We have Outlook so I used semi-colons.我们有 Outlook 所以我使用了分号。

This might be blocked by group policy - I get a warning about it.这可能被组策略阻止 - 我收到有关它的警告。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM