<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Power BI Report Server SSRS Subscription in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-SSRS-Subscription/m-p/557136#M8709</link>
    <description>&lt;P&gt;You can create a data driven subscription. In the query where you select&amp;nbsp; the data, you can make the check if the report should send. If not, the row is not in the resultset.&lt;/P&gt;</description>
    <pubDate>Wed, 31 Oct 2018 07:04:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-31T07:04:51Z</dc:date>
    <item>
      <title>Power BI Report Server SSRS Subscription</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-SSRS-Subscription/m-p/557102#M8707</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a SSRS report and I imported it to PBIRS. I have arranged e-mail subscriptions and that is ok.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is, sometimes my report returns no result and I do not want PBIRS to send any e mail. Now, it sends e-mail with no result, just empty colons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I handle this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 06:33:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-SSRS-Subscription/m-p/557102#M8707</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-31T06:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Report Server SSRS Subscription</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-SSRS-Subscription/m-p/557136#M8709</link>
      <description>&lt;P&gt;You can create a data driven subscription. In the query where you select&amp;nbsp; the data, you can make the check if the report should send. If not, the row is not in the resultset.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 07:04:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-SSRS-Subscription/m-p/557136#M8709</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-31T07:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Report Server SSRS Subscription</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-SSRS-Subscription/m-p/558132#M8731</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you give more detail? For instance, my mail query is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if (select COUNT(*) from MIX.rapor.vIkMailRaporu) &amp;gt; 1&lt;/P&gt;&lt;P&gt;begin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;'mail adresses of my company'&lt;/P&gt;&lt;P&gt;as Mail&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;end&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;else begin&lt;/P&gt;&lt;P&gt;select ' ' as Mail&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;where should I make this check? I want PBIRS not to send e mail if my report has no result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 05:51:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-SSRS-Subscription/m-p/558132#M8731</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-01T05:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Report Server SSRS Subscription</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-SSRS-Subscription/m-p/558673#M8732</link>
      <description>&lt;P&gt;You can only use the data driven subscription if the PBIRS instance is on an enterprise license.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it is not, you can stop the schedule in PBIRS but still leave the job intact so you have the To: , cc: etc and get the nice report server formatting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then from the SQL Agent create you own scheduled job that calls the PBIRS job. You'll need to look up the SQLAgent guid.&lt;/P&gt;&lt;P&gt;You can use this and change 'YOUR REPORT NAME%' accordingly:&lt;/P&gt;&lt;PRE&gt;use ReportServer
go
select S.ScheduleID as SQLAgent_Job_Name
	,SUB.Description as Sub_Desc
	,SUB.DeliveryExtension as Sub_Del_Extension
	,C.name as ReportName
	,C.Path as ReportPath
	,SUB.LastStatus
	,SUB.LastRunTime
	FROM ReportSchedule RS
inner join Schedule S on (RS.ScheduleID = S.ScheduleID)
inner join Subscriptions SUB on (RS.SubscriptionID = SUB.SubscriptionID)
left join [Catalog] C on (
		RS.ReportID = C.ItemID
		and SUB.Report_OID = C.ItemID
		)
where C.name like '%YOUR REPORT NAME%' --Enter Report Name to find Job_Name
ORDER BY SUB.LastRunTime desc&lt;/PRE&gt;&lt;P&gt;Pseudo code for the agent job would be like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If @rows &amp;gt; 0&lt;/P&gt;&lt;P&gt;Begin&lt;/P&gt;&lt;P&gt;USE msdb EXEC sp_start_job Anonymous&lt;/LI-USER&gt;_name = 'A00E3318-9D97-45E8-8476-526118CA62B1' /*Enter SQLAgent_Job_Name for PBIRS job*/&lt;/P&gt;&lt;P&gt;End&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;Return /* nothing to do */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 21:40:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-SSRS-Subscription/m-p/558673#M8732</guid>
      <dc:creator>em172967</dc:creator>
      <dc:date>2018-11-01T21:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Report Server SSRS Subscription</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-SSRS-Subscription/m-p/561169#M8757</link>
      <description>&lt;P&gt;Additionally, if you have a PBI RS you have the Enterprise Edition. So you have the option to create data driven subscriptions.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 19:32:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Power-BI-Report-Server-SSRS-Subscription/m-p/561169#M8757</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-06T19:32:27Z</dc:date>
    </item>
  </channel>
</rss>

