<?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>article Dynamic Links in Qlik NPrinting Reports to Sense Apps in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Dynamic-Links-in-Qlik-NPrinting-Reports-to-Sense-Apps/ta-p/1562314</link>
    <description>&lt;P&gt;The goal is to insert dynamic links to the Qlik Sense app used to populate a Qlik Nprinting report with the same filters that produced the report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Environment:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;LI-PRODUCT title="Qlik NPrinting" id="qlikNPrinting"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;BR /&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise on Windows" id="qlikSenseEnterpriseWindows"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Qlik Sense help site page &lt;SPAN&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/February2022/Subsystems/Mashups/Content/Sense_Mashups/Embed/embed.htm" target="_blank" rel="noopener"&gt;Embed objects, apps, and visualizations&lt;/A&gt;&lt;/SPAN&gt; informs that it is possible to create a link to a Qlik Sense app with applied filters in the URL. For example: &lt;EM&gt;https://&amp;lt;servername&amp;gt;/sense/app/4d541aea-a8b1-4cef-a4c2-6bda620321a9/sheet/XuWLHFK/state/analysis/options/clearselections/select/Year/2014/select/Region Name/International;Canada&lt;/EM&gt; where:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;4d541aea-a8b1-4cef-a4c2-6bda620321a9 is the linked app ID placed after the /app/ keyword&lt;/LI&gt;
&lt;LI&gt;XuWLHFK is the sheet ID placed after the /sheet/ keyword&lt;/LI&gt;
&lt;LI&gt;/options/clearselections/ is the option to clear all previous selections&lt;/LI&gt;
&lt;LI&gt;/select/ is the keyword that must precede each filter&lt;/LI&gt;
&lt;LI&gt;/Year/ is the name of the first field we want to filter&lt;/LI&gt;
&lt;LI&gt;/2014/ is the value to keep. To keep more values you have to separate them with a semicolon like /International;Canada&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;So to create a link to the Qlik Sense app in the generated report we need to concatenate a fixed first part, that links the app ID and the sheet ID, with a second, dynamic, part that sends to Qlik Sense the Qlik NPrinting filters.&lt;/P&gt;
&lt;P&gt;To create the second part we can use the GetCurrentSelections() function &lt;SPAN&gt;&lt;A href="https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getcurrentselections.htm" target="_blank" rel="noopener"&gt;GetCurrentSelections - chart function&lt;/A&gt;&lt;/SPAN&gt; that also allows to customize the separators. To obtain results consistent with the Qlik Sense URL format we will use &lt;EM&gt;GetCurrentSelections('/select/','/',';')&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;We will create an URL so pay attention at the unsafe characters. If they are present in field values they can invalidate the created link. Refer to &lt;SPAN&gt;&lt;A href="https://www.ietf.org/rfc/rfc1738.txt" target="_blank" rel="noopener"&gt;https://www.ietf.org/rfc/rfc1738.txt&lt;/A&gt;&lt;/SPAN&gt; or to &lt;SPAN&gt;&lt;A href="https://help.dragonmetrics.com/seo-help-center/site-issues/invalid-characters-in-url" target="_blank" rel="noopener"&gt;https://help.dragonmetrics.com/seo-help-center/site-issues/invalid-characters-in-url&lt;/A&gt;&lt;/SPAN&gt; or to other web pages about this topic.&lt;/P&gt;
&lt;P&gt;Also adding the &lt;EM&gt;max_values&lt;/EM&gt; parameters is a good idea to avoid that the ‘x of y valuess’ expression invalidate the generated URL.&lt;/P&gt;
&lt;P&gt;Open a Qlik NPrinting report template. To keep the explanation simple we will create an HTML report with only the link.&lt;/P&gt;
&lt;P&gt;Add a new formula on the Formulas node, insert a name, select the correct connection and insert a formula like: &lt;EM&gt;='&lt;A href="https://SenseServerAddress/sense/app/AppID/sheet/SheetID/state/analysis/" target="_blank"&gt;https://SenseServerAddress/sense/app/AppID/sheet/SheetID/state/analysis/&lt;/A&gt; options/clearselections/select/' &amp;amp; GetCurrentSelections('/select/','/',';')&lt;/EM&gt;. Of course you must customize the first part.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="010.png" style="width: 913px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9011iF4D208095691E7A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="010.png" alt="010.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then create an HTML link in the template by using the formula. Something like: &lt;EM&gt;&amp;lt;a href="%%LinkToSenseBeginnerAppWithFilters%%"&amp;gt;Link to Qlik Sense App&amp;lt;/a&amp;gt;.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Save the template and run a report preview without filters. Click the link in the preview to check that the Qlik Sense app is opened correctly without filters.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="020.png" style="width: 975px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9012i58E47D58618948E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="020.png" alt="020.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Clicking the link will open the Qlik Sense app.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="030.png" style="width: 975px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9013iA911568721A75E49/image-size/large?v=v2&amp;amp;px=999" role="button" title="030.png" alt="030.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Create a Qlik NPrinting filter as usual and apply it to the report. Run a new preview.&lt;/P&gt;
&lt;P&gt;In the screenshot below you can see that the created link now contains the filtering information.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="040.png" style="width: 975px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9014i84C63BA63AFE2EFA/image-size/large?v=v2&amp;amp;px=999" role="button" title="040.png" alt="040.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Clicking on the link will open the Qlik Sense app with the correct filters applied.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="050.png" style="width: 975px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9015i2F918A1C51B6D579/image-size/large?v=v2&amp;amp;px=999" role="button" title="050.png" alt="050.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Apr 2022 08:37:06 GMT</pubDate>
    <dc:creator>Ruggero_Piccoli</dc:creator>
    <dc:date>2022-04-08T08:37:06Z</dc:date>
    <item>
      <title>Dynamic Links in Qlik NPrinting Reports to Sense Apps</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Dynamic-Links-in-Qlik-NPrinting-Reports-to-Sense-Apps/ta-p/1562314</link>
      <description>&lt;P&gt;The goal is to insert dynamic links to the Qlik Sense app used to populate a Qlik Nprinting report with the same filters that produced the report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Environment:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;LI-PRODUCT title="Qlik NPrinting" id="qlikNPrinting"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;BR /&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise on Windows" id="qlikSenseEnterpriseWindows"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Qlik Sense help site page &lt;SPAN&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/February2022/Subsystems/Mashups/Content/Sense_Mashups/Embed/embed.htm" target="_blank" rel="noopener"&gt;Embed objects, apps, and visualizations&lt;/A&gt;&lt;/SPAN&gt; informs that it is possible to create a link to a Qlik Sense app with applied filters in the URL. For example: &lt;EM&gt;https://&amp;lt;servername&amp;gt;/sense/app/4d541aea-a8b1-4cef-a4c2-6bda620321a9/sheet/XuWLHFK/state/analysis/options/clearselections/select/Year/2014/select/Region Name/International;Canada&lt;/EM&gt; where:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;4d541aea-a8b1-4cef-a4c2-6bda620321a9 is the linked app ID placed after the /app/ keyword&lt;/LI&gt;
&lt;LI&gt;XuWLHFK is the sheet ID placed after the /sheet/ keyword&lt;/LI&gt;
&lt;LI&gt;/options/clearselections/ is the option to clear all previous selections&lt;/LI&gt;
&lt;LI&gt;/select/ is the keyword that must precede each filter&lt;/LI&gt;
&lt;LI&gt;/Year/ is the name of the first field we want to filter&lt;/LI&gt;
&lt;LI&gt;/2014/ is the value to keep. To keep more values you have to separate them with a semicolon like /International;Canada&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;So to create a link to the Qlik Sense app in the generated report we need to concatenate a fixed first part, that links the app ID and the sheet ID, with a second, dynamic, part that sends to Qlik Sense the Qlik NPrinting filters.&lt;/P&gt;
&lt;P&gt;To create the second part we can use the GetCurrentSelections() function &lt;SPAN&gt;&lt;A href="https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getcurrentselections.htm" target="_blank" rel="noopener"&gt;GetCurrentSelections - chart function&lt;/A&gt;&lt;/SPAN&gt; that also allows to customize the separators. To obtain results consistent with the Qlik Sense URL format we will use &lt;EM&gt;GetCurrentSelections('/select/','/',';')&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;We will create an URL so pay attention at the unsafe characters. If they are present in field values they can invalidate the created link. Refer to &lt;SPAN&gt;&lt;A href="https://www.ietf.org/rfc/rfc1738.txt" target="_blank" rel="noopener"&gt;https://www.ietf.org/rfc/rfc1738.txt&lt;/A&gt;&lt;/SPAN&gt; or to &lt;SPAN&gt;&lt;A href="https://help.dragonmetrics.com/seo-help-center/site-issues/invalid-characters-in-url" target="_blank" rel="noopener"&gt;https://help.dragonmetrics.com/seo-help-center/site-issues/invalid-characters-in-url&lt;/A&gt;&lt;/SPAN&gt; or to other web pages about this topic.&lt;/P&gt;
&lt;P&gt;Also adding the &lt;EM&gt;max_values&lt;/EM&gt; parameters is a good idea to avoid that the ‘x of y valuess’ expression invalidate the generated URL.&lt;/P&gt;
&lt;P&gt;Open a Qlik NPrinting report template. To keep the explanation simple we will create an HTML report with only the link.&lt;/P&gt;
&lt;P&gt;Add a new formula on the Formulas node, insert a name, select the correct connection and insert a formula like: &lt;EM&gt;='&lt;A href="https://SenseServerAddress/sense/app/AppID/sheet/SheetID/state/analysis/" target="_blank"&gt;https://SenseServerAddress/sense/app/AppID/sheet/SheetID/state/analysis/&lt;/A&gt; options/clearselections/select/' &amp;amp; GetCurrentSelections('/select/','/',';')&lt;/EM&gt;. Of course you must customize the first part.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="010.png" style="width: 913px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9011iF4D208095691E7A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="010.png" alt="010.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then create an HTML link in the template by using the formula. Something like: &lt;EM&gt;&amp;lt;a href="%%LinkToSenseBeginnerAppWithFilters%%"&amp;gt;Link to Qlik Sense App&amp;lt;/a&amp;gt;.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Save the template and run a report preview without filters. Click the link in the preview to check that the Qlik Sense app is opened correctly without filters.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="020.png" style="width: 975px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9012i58E47D58618948E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="020.png" alt="020.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Clicking the link will open the Qlik Sense app.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="030.png" style="width: 975px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9013iA911568721A75E49/image-size/large?v=v2&amp;amp;px=999" role="button" title="030.png" alt="030.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Create a Qlik NPrinting filter as usual and apply it to the report. Run a new preview.&lt;/P&gt;
&lt;P&gt;In the screenshot below you can see that the created link now contains the filtering information.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="040.png" style="width: 975px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9014i84C63BA63AFE2EFA/image-size/large?v=v2&amp;amp;px=999" role="button" title="040.png" alt="040.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Clicking on the link will open the Qlik Sense app with the correct filters applied.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="050.png" style="width: 975px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9015i2F918A1C51B6D579/image-size/large?v=v2&amp;amp;px=999" role="button" title="050.png" alt="050.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 08:37:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Dynamic-Links-in-Qlik-NPrinting-Reports-to-Sense-Apps/ta-p/1562314</guid>
      <dc:creator>Ruggero_Piccoli</dc:creator>
      <dc:date>2022-04-08T08:37:06Z</dc:date>
    </item>
  </channel>
</rss>

