[英]SSRS data driven subscription email to : parameter dependent on report parameter?
嗨,我正在使用Visual Studio 2015制作SSRS 2014報告。 我停留在的位置是我的電子郵件收件人,這取決於從SSRS報告中選擇的公司。
沒關系,但是我的報告參數是Company(實際上是companyID),begdat,enddate。
select email from users where companyid= @companyid<< which would be my selection.
我看到的大多數示例都有一個已定義的電子郵件列表,或者只有一個人可以發送電子郵件。 我只想向每個公司(也稱為動態收件人列表)的用戶發送報告。
將查詢修改為: select email, companyid from users
在下一步中,選擇一個選項: Get the value from the database
獲取TO
字段的值,並將其設置為email
。
在下一步中,將您的公司選項更改為Get the value from the database
並將其設置為companyid
。
這樣,公司CompanyA的用戶將僅收到CompanyA報告,而CompanyB-僅收到CompanyB報告。
您可以僅使用電子郵件使用臨時查詢來調試訂閱:
select email='your@email', companyid = 'CompanyAid' UNION ALL select email='your@email', companyid = 'CompanyBid'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.