<?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 How to change a background image in a chart dynamically? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-change-a-background-image-in-a-chart-dynamically/m-p/237632#M88665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, you want to set up the chart background using Dynamic Image. You then want to set that Dynamic Image to a variable value. For example:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=$(vImage)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;I found you must have the equals sign for it to work. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then for your variable value, you enter the path. I needed single quotes around the path.&lt;/P&gt;&lt;P&gt;Now, the hard part is letting the user pick the image. I've used Excel automation to give the user a file select box in a macro. For a macro, you could use something like:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Set oXL=CreateObject("Excel.Application")&lt;BR /&gt;&lt;BR /&gt; f_name=oXL.GetOpenFilename("All Files (*.*),*.*",,"Select file",False)&lt;BR /&gt;&lt;BR /&gt; If f_name="False" then&lt;BR /&gt; 'user cancelled out of dialog box&lt;BR /&gt; Set oXL=nothing&lt;BR /&gt; Exit sub&lt;BR /&gt; End If&lt;BR /&gt;&lt;BR /&gt;ActiveDocument.Variables("vImage").SetContent "'" &amp;amp; f_name &amp;amp; "'", true&lt;BR /&gt;&lt;BR /&gt;Set oXL=nothing&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You may have to tweak it a bit, but that should work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Nov 2009 23:38:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-11-10T23:38:26Z</dc:date>
    <item>
      <title>How to change a background image in a chart dynamically?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-change-a-background-image-in-a-chart-dynamically/m-p/237631#M88664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My customer wants to have a water print of his own choice to be displayed in a chart. Therefore I´m looking for a dynamic solution in order to modify the background image of a chart (not a text object).&lt;/P&gt;&lt;P&gt;Any idea??&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2009 23:28:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-change-a-background-image-in-a-chart-dynamically/m-p/237631#M88664</guid>
      <dc:creator />
      <dc:date>2009-11-10T23:28:24Z</dc:date>
    </item>
    <item>
      <title>How to change a background image in a chart dynamically?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-change-a-background-image-in-a-chart-dynamically/m-p/237632#M88665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, you want to set up the chart background using Dynamic Image. You then want to set that Dynamic Image to a variable value. For example:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=$(vImage)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;I found you must have the equals sign for it to work. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then for your variable value, you enter the path. I needed single quotes around the path.&lt;/P&gt;&lt;P&gt;Now, the hard part is letting the user pick the image. I've used Excel automation to give the user a file select box in a macro. For a macro, you could use something like:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Set oXL=CreateObject("Excel.Application")&lt;BR /&gt;&lt;BR /&gt; f_name=oXL.GetOpenFilename("All Files (*.*),*.*",,"Select file",False)&lt;BR /&gt;&lt;BR /&gt; If f_name="False" then&lt;BR /&gt; 'user cancelled out of dialog box&lt;BR /&gt; Set oXL=nothing&lt;BR /&gt; Exit sub&lt;BR /&gt; End If&lt;BR /&gt;&lt;BR /&gt;ActiveDocument.Variables("vImage").SetContent "'" &amp;amp; f_name &amp;amp; "'", true&lt;BR /&gt;&lt;BR /&gt;Set oXL=nothing&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You may have to tweak it a bit, but that should work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2009 23:38:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-change-a-background-image-in-a-chart-dynamically/m-p/237632#M88665</guid>
      <dc:creator />
      <dc:date>2009-11-10T23:38:26Z</dc:date>
    </item>
    <item>
      <title>How to change a background image in a chart dynamically?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-change-a-background-image-in-a-chart-dynamically/m-p/237633#M88666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as far as i know there is no API method to programmatically set the background image of a sheet object (background image are not just referenced by their path in the document, they are fully embedded in it), you must use the sheet object properties dialog box to set it manually&lt;/P&gt;&lt;P&gt;anyway, i'm interested in a workaround if someone has one&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2009 23:57:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-change-a-background-image-in-a-chart-dynamically/m-p/237633#M88666</guid>
      <dc:creator />
      <dc:date>2009-11-10T23:57:36Z</dc:date>
    </item>
    <item>
      <title>How to change a background image in a chart dynamically?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-change-a-background-image-in-a-chart-dynamically/m-p/237634#M88667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies. When using V9.0 a solution for a dynamic background could look like this. The user has an excel table where he can insert the file names of the bitmaps to be displayed as background image.&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;BackgroundImage:&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;DIRECTORY&lt;/B&gt; Images;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;LOAD&lt;/B&gt; Report, Bitmap&lt;/P&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;FROM&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;[Images.xls]&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;(biff, embedded labels, table is Tabelle1$);&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;LET&lt;/B&gt; LocReport = 35;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;FOR&lt;/B&gt; i = 1 &lt;B&gt;TO&lt;/B&gt; LocReport&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;LET&lt;/B&gt; LocImage = 'LocImage' &amp;amp; num(i,'00');&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;LET&lt;/B&gt; LocBitmap = lookup('Bitmap','Report',num(i,'00'), &lt;I&gt;'BackgroundImage'&lt;/I&gt;);&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;IF&lt;/B&gt; LocBitmap &amp;lt;&amp;gt; NULL &lt;B&gt;THEN&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;&lt;I&gt;$(LocImage)&lt;/I&gt;&lt;/B&gt; = '.\Images\' &amp;amp; LocBitmap;&lt;/P&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;ELSE&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;SET&lt;/B&gt; &lt;B&gt;&lt;I&gt;$(LocImage)&lt;/I&gt;&lt;/B&gt; = '';&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;ENDIF&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;NEXT&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;DIRECTORY;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;and e.g. =$('LocImage35') &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;as dynamic picture in the chart properties.&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;Regards&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;Christian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2009 15:11:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-change-a-background-image-in-a-chart-dynamically/m-p/237634#M88667</guid>
      <dc:creator />
      <dc:date>2009-11-13T15:11:27Z</dc:date>
    </item>
  </channel>
</rss>

