<?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: Data Set Parameter Not Being Passed to DB Query in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Data-Set-Parameter-Not-Being-Passed-to-DB-Query/m-p/399536#M5213</link>
    <description>&lt;P&gt;There is a way to have the KPI get latest data using cache refresh plan for the underlying data set:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/forums/replypage/board-id/ReportServer/message-id/5062" target="_blank"&gt;https://community.powerbi.com/t5/forums/replypage/board-id/ReportServer/message-id/5062&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that the refresh is time based, you can make the cache expire every minute, but if you want to trigger a refresh each time a user visits the server, you'll need to create a custom solution (e.g. schedule a refresh job using SQL Agent).&lt;/P&gt;</description>
    <pubDate>Wed, 18 Apr 2018 21:25:34 GMT</pubDate>
    <dc:creator>krisztb</dc:creator>
    <dc:date>2018-04-18T21:25:34Z</dc:date>
    <item>
      <title>Data Set Parameter Not Being Passed to DB Query</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Data-Set-Parameter-Not-Being-Passed-to-DB-Query/m-p/393424#M5023</link>
      <description>&lt;P&gt;I've got a Report Server data set that is sourcing from Netezza.&amp;nbsp; I need to pull values from a table based on the current user's username.&amp;nbsp; I've added a&amp;nbsp;@CurrentUser parameter to my query, and I've defined that parameter in the data set options as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=iif(InStr(User!UserID,"\") &amp;lt;&amp;gt; 0, UCase(Right(User!UserID, Len(User!UserID) - InStr(User!UserID,"\"))), UCase(User!UserID))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to run my query in Report Builder, I get a Define Query Parameters popup that identifies my&amp;nbsp;@CurrentUser parameter and asks for the Parameter Value and the Data Type.&amp;nbsp; If I save the data set and try to preview the data on the Report Server, I get an error message that states "The data set could not be processed because it requires non empty parameters".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess my first question is whether it is even possible to use the User!UserID function in a data set on the Report Server.&amp;nbsp; Second, why is it not recognizing that I have defined this parameter in the data set?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 15:52:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Data-Set-Parameter-Not-Being-Passed-to-DB-Query/m-p/393424#M5023</guid>
      <dc:creator>EJones</dc:creator>
      <dc:date>2018-04-10T15:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Data Set Parameter Not Being Passed to DB Query</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Data-Set-Parameter-Not-Being-Passed-to-DB-Query/m-p/393605#M5029</link>
      <description>&lt;P&gt;Data preview for data sets with parameters has limitations (even when they rely on expressions), but&amp;nbsp;the data sets should work fine once you use them from reports.&lt;/P&gt;&lt;P&gt;I assume you are designing a shared data set. Consider making the @CurrentUser parameter internal if you don't plan to override it from actual reports. Once the data set is saved you can test it by creating a report that uses it. Just build one in Report Builder and hit preview on the report itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you still have problems with data sets.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 23:36:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Data-Set-Parameter-Not-Being-Passed-to-DB-Query/m-p/393605#M5029</guid>
      <dc:creator>krisztb</dc:creator>
      <dc:date>2018-04-10T23:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Data Set Parameter Not Being Passed to DB Query</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Data-Set-Parameter-Not-Being-Passed-to-DB-Query/m-p/394455#M5062</link>
      <description>&lt;P&gt;Thanks, I see that it does correctly pass the parameter value through to the query now when creating a KPI.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Follow-up question: Is there a way to make KPIs refresh automatically when someone visits the report server page and have it refresh based off of the username of whoever is visiting?&amp;nbsp; The values of my KPIs are shown based on the username of the person who created them, but if I log in as a different user, I still see those same values even though I need it to update based on the current user.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 19:33:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Data-Set-Parameter-Not-Being-Passed-to-DB-Query/m-p/394455#M5062</guid>
      <dc:creator>EJones</dc:creator>
      <dc:date>2018-04-11T19:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: Data Set Parameter Not Being Passed to DB Query</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Data-Set-Parameter-Not-Being-Passed-to-DB-Query/m-p/399536#M5213</link>
      <description>&lt;P&gt;There is a way to have the KPI get latest data using cache refresh plan for the underlying data set:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/forums/replypage/board-id/ReportServer/message-id/5062" target="_blank"&gt;https://community.powerbi.com/t5/forums/replypage/board-id/ReportServer/message-id/5062&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that the refresh is time based, you can make the cache expire every minute, but if you want to trigger a refresh each time a user visits the server, you'll need to create a custom solution (e.g. schedule a refresh job using SQL Agent).&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 21:25:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Data-Set-Parameter-Not-Being-Passed-to-DB-Query/m-p/399536#M5213</guid>
      <dc:creator>krisztb</dc:creator>
      <dc:date>2018-04-18T21:25:34Z</dc:date>
    </item>
  </channel>
</rss>

