简体   繁体   English

SSRS 2008电子邮件报告

[英]SSRS 2008 emailing Reports

Was wondering if anyone could help me out. 想知道是否有人可以帮助我。 I have written a report in SSRS 2008. I would like to add a button or a link on the page that will email the currently run report. 我已经在SSRS 2008中编写了一份报告。我想在页面上添加一个按钮或链接,以通过电子邮件发送当前运行的报告。 I know I can do this in subscription and set a schedule for this however the data needs to be checked before an email can be sent out. 我知道我可以在订阅中执行此操作并为此设置时间表,但是在发送电子邮件之前需要检查数据。

Thanks for taking a look Rusty 感谢您看生锈

Essentially what you want to do is put a mailto link on the page that generates an email when the user clicks on it. 本质上,您要做的是在页面上放置一个mailto链接,当用户单击该链接时会生成一封电子邮件。 There is a component of the mailto link which will include an attachment. mailto链接的一个组件将包括一个附件。 However, the attachment must be a locally housed file, it cannot be stored at a web address. 但是,附件必须是本地存储的文件,无法将其存储在网址中。 See more here . 在这里查看更多。

If the report you are running does not require many resources, you can set up a subscription which will, on a scheduled basis (say every 5 minutes), write the report to a file on a shared drive. 如果正在运行的报告不需要很多资源,则可以设置一个订阅,该订阅将按计划(例如每5分钟)将报告写入共享驱动器上的文件中。 Therefore, the report is constantly being written and updated at a local path. 因此,在本地路径上不断编写和更新报告。 Then, you should be able to use the "&attachment=" portion of the mailto link to refer to this subscription-generated file sitting somewhere on a shared drive. 然后,您应该能够使用mailto链接的“&attachment =“部分来引用此订阅生成的文件,该文件位于共享驱动器上的某个位置。 This might not be a good option for you if you're counting on up-to-the-second data in this report you're generating. 如果您要依靠正在生成的此报告中的最新数据,这可能不是一个好的选择。 Then again, if you're having the report manually reviewed by human eyes, then that's probably not too much of an issue. 再说一次,如果您要用肉眼手动检查报告,那么这可能不是什么大问题。

If you pursue this solution, it will be important to keep in mind that whatever shared drive you have your subscription write the file to will need to be accessible by anyone that will be clicking on that mailto link. 如果您采用此解决方案,请务必牢记,无论您订阅了什么共享驱动器,都将需要单击该mailto链接的任何人访问该文件。 It's not sufficient for you to have access to it. 访问它还不够。 When that mailto link is clicked, it will use Windows authentication (or authentication from whatever system you're using) to connect to that shared drive and retrieve the file. 单击该mailto链接后,它将使用Windows身份验证(或使用任何系统的身份验证)连接到该共享驱动器并检索文件。

Best of luck! 祝你好运!

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

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