<?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: tring to export a chart into jpg file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/tring-to-export-a-chart-into-jpg-file/m-p/639755#M1089626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't possible because while a script-execution exists no ActiveDocument or a GUI - therefore any access on such objects will be failed. You could only open your app from outside per batch or vbs and execute your export with any trigger or directly, examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open + Reload per Batch (bat- or cmd-file):&lt;/P&gt;&lt;P&gt;\\QVSERVER\d\QlikView\Client\QV.exe /r "\\ QVSERVER \d\Qlikview\Reports\MyApp.qvw"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open + Export per vbs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;sub export&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;dim doc, newApp, newdoc, ex&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;set doc = ActiveDocument&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;set newApp = ActiveDocument.GetApplication &lt;BR /&gt;set newdoc = newApp.OpenDoc (path.Text &amp;amp; "\" &amp;amp; app.Text,"","") &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;set ex = newdoc.GetSheetObject("CH172") &lt;BR /&gt;ex.Activate &lt;BR /&gt;ex.maximize&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;ex.ExportBitmapToFile path &amp;amp; "Gesamt " &amp;amp; datum &amp;amp; ".bmp" &lt;BR /&gt;ex.minimize&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;newdoc.closedoc &lt;BR /&gt;doc.GetApplication.Quit &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;end sub &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;- Marcus&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 May 2014 12:35:23 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2014-05-20T12:35:23Z</dc:date>
    <item>
      <title>tring to export a chart into jpg file</title>
      <link>https://community.qlik.com/t5/QlikView/tring-to-export-a-chart-into-jpg-file/m-p/639753#M1089624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying unsuccessfully to export a chart into jpg file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the macro I wrote:&lt;/P&gt;&lt;P&gt;FUNCTION ExportObjetToJpg (ObjID,FName)&lt;/P&gt;&lt;P&gt;ActiveDocument.GetSheetObject(ObjID).ExportBitmapToFile Fname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Script section I called the macro:&lt;/P&gt;&lt;P&gt;Let var1=ExportObjectToJpg("CH57","C:\Bi\Dev\SalesGen.jpg")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The qv file attached&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 11:56:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/tring-to-export-a-chart-into-jpg-file/m-p/639753#M1089624</guid>
      <dc:creator />
      <dc:date>2014-05-20T11:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: tring to export a chart into jpg file</title>
      <link>https://community.qlik.com/t5/QlikView/tring-to-export-a-chart-into-jpg-file/m-p/639754#M1089625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Here you are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION ExportObjectToJpg( ObjID, fName)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ActiveDocument.GetSheetObject(ObjID).ExportBitmapToFile fName&lt;/P&gt;&lt;P&gt;END FUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub gonza&lt;/P&gt;&lt;P&gt;rem *** This method is not meaningful for all types of sheet objects ***&lt;/P&gt;&lt;P&gt;set obj = ActiveDocument.GetSheetObject("CH57")&lt;/P&gt;&lt;P&gt;obj.ExportBitmapToFile "c:\Image.jpg"&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR//Gonza&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 12:28:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/tring-to-export-a-chart-into-jpg-file/m-p/639754#M1089625</guid>
      <dc:creator>gonzaloruizgonz</dc:creator>
      <dc:date>2014-05-20T12:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: tring to export a chart into jpg file</title>
      <link>https://community.qlik.com/t5/QlikView/tring-to-export-a-chart-into-jpg-file/m-p/639755#M1089626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't possible because while a script-execution exists no ActiveDocument or a GUI - therefore any access on such objects will be failed. You could only open your app from outside per batch or vbs and execute your export with any trigger or directly, examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open + Reload per Batch (bat- or cmd-file):&lt;/P&gt;&lt;P&gt;\\QVSERVER\d\QlikView\Client\QV.exe /r "\\ QVSERVER \d\Qlikview\Reports\MyApp.qvw"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open + Export per vbs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;sub export&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;dim doc, newApp, newdoc, ex&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;set doc = ActiveDocument&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;set newApp = ActiveDocument.GetApplication &lt;BR /&gt;set newdoc = newApp.OpenDoc (path.Text &amp;amp; "\" &amp;amp; app.Text,"","") &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;set ex = newdoc.GetSheetObject("CH172") &lt;BR /&gt;ex.Activate &lt;BR /&gt;ex.maximize&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;ex.ExportBitmapToFile path &amp;amp; "Gesamt " &amp;amp; datum &amp;amp; ".bmp" &lt;BR /&gt;ex.minimize&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;newdoc.closedoc &lt;BR /&gt;doc.GetApplication.Quit &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;end sub &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;- Marcus&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 12:35:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/tring-to-export-a-chart-into-jpg-file/m-p/639755#M1089626</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-05-20T12:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: tring to export a chart into jpg file</title>
      <link>https://community.qlik.com/t5/QlikView/tring-to-export-a-chart-into-jpg-file/m-p/639756#M1089627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the answers, Gonzalo - I couldn't manage to get the jpg file&lt;/P&gt;&lt;P&gt;and Marcus I don't know vb script (do I run them as .bat extension?)&lt;/P&gt;&lt;P&gt;but I used the trigger on Post Reload instead from here: &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4315"&gt;http://community.qlik.com/docs/DOC-4315&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However now I have to use the macro for each month selected (30 times),&lt;/P&gt;&lt;P&gt;Is it possible to change 'current selection' from the script (and run with a loop)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 20:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/tring-to-export-a-chart-into-jpg-file/m-p/639756#M1089627</guid>
      <dc:creator />
      <dc:date>2014-05-20T20:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Re: tring to export a chart into jpg file</title>
      <link>https://community.qlik.com/t5/QlikView/tring-to-export-a-chart-into-jpg-file/m-p/639757#M1089628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use for such things (reloading, exports) a (per windows scheduler triggered) qvw-file with a Post-Reload-Trigger which the target-qvw's opened and reload, exports and so on. A loop through field-values is possible - have a look on the changed script. How it worked and for further possibilities look in APIGuide.qvw in your install-folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;sub export&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;"&gt;dim doc, newApp, newdoc, ex&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;"&gt;dim lbaw, valueOne&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 10pt;"&gt;set doc = ActiveDocument&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 10pt;"&gt;set newApp = ActiveDocument.GetApplication &lt;BR /&gt;set newdoc = newApp.OpenDoc (path.Text &amp;amp; "\" &amp;amp; app.Text,"","") &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 10pt;"&gt;set lbaw = ActiveDocument.GetSheetObject("LB09")&lt;BR /&gt;valueOne = lbaw.GetPossibleValues&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 10pt;"&gt;set ex = newdoc.GetSheetObject("CH172") &lt;BR /&gt;ex.Activate &lt;BR /&gt;ex.maximize&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;for i_One = lbound(valueOne) to ubound(valueOne)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; valueSelection = valueOne(i_One)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newdoc.Fields("YourField").Select(valueSelection)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newdoc.GetApplication.WaitForIdle&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ex.ExportBitmapToFile path &amp;amp; "Gesamt " &amp;amp; datum &amp;amp; ".bmp" &lt;BR /&gt;next &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 10pt;"&gt;ex.minimize&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 10pt;"&gt;newdoc.closedoc &lt;BR /&gt;doc.GetApplication.Quit &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: andale mono,times;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;end sub &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2014 08:00:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/tring-to-export-a-chart-into-jpg-file/m-p/639757#M1089628</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-05-21T08:00:56Z</dc:date>
    </item>
  </channel>
</rss>

