<?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 Export from document to several jpg files in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Export-from-document-to-several-jpg-files/m-p/165050#M37511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a document with a macro at the OnPostReload. In this macro I want to export several images with different selections. The macro looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub exportGraphToDisc&lt;BR /&gt; GraphPath = "c:\ba"&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("MAINLOCATION").Select "Ula"&lt;BR /&gt; ActiveDocument.Fields("LOCATIONCODE").Select "ULA"&lt;BR /&gt; ActiveDocument.Sheets("Main").ExportBitmapToFile GraphPath &amp;amp; "a1.jpg"&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("MAINLOCATION").Select "Valhall"&lt;BR /&gt; ActiveDocument.Fields("LOCATIONCODE").Select "VAL"&lt;BR /&gt; ActiveDocument.Sheets("Main").ExportBitmapToFile GraphPath &amp;amp; "a2.jpg"&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;What happens is that when the macro is finished, the document show correct on the scrren, but both images are identical and shows the values as they were before the macro was started. It looks like the export is executed correct, but that the Select statements are running after the macro has been closed. Does somebody know if it is possible to force the execution of the ExportBitmapToFile inside the macro or are there any other solution?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2009 16:21:50 GMT</pubDate>
    <dc:creator>ob</dc:creator>
    <dc:date>2009-11-25T16:21:50Z</dc:date>
    <item>
      <title>Export from document to several jpg files</title>
      <link>https://community.qlik.com/t5/QlikView/Export-from-document-to-several-jpg-files/m-p/165050#M37511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a document with a macro at the OnPostReload. In this macro I want to export several images with different selections. The macro looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub exportGraphToDisc&lt;BR /&gt; GraphPath = "c:\ba"&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("MAINLOCATION").Select "Ula"&lt;BR /&gt; ActiveDocument.Fields("LOCATIONCODE").Select "ULA"&lt;BR /&gt; ActiveDocument.Sheets("Main").ExportBitmapToFile GraphPath &amp;amp; "a1.jpg"&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("MAINLOCATION").Select "Valhall"&lt;BR /&gt; ActiveDocument.Fields("LOCATIONCODE").Select "VAL"&lt;BR /&gt; ActiveDocument.Sheets("Main").ExportBitmapToFile GraphPath &amp;amp; "a2.jpg"&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;What happens is that when the macro is finished, the document show correct on the scrren, but both images are identical and shows the values as they were before the macro was started. It looks like the export is executed correct, but that the Select statements are running after the macro has been closed. Does somebody know if it is possible to force the execution of the ExportBitmapToFile inside the macro or are there any other solution?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2009 16:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-from-document-to-several-jpg-files/m-p/165050#M37511</guid>
      <dc:creator>ob</dc:creator>
      <dc:date>2009-11-25T16:21:50Z</dc:date>
    </item>
    <item>
      <title>Export from document to several jpg files</title>
      <link>https://community.qlik.com/t5/QlikView/Export-from-document-to-several-jpg-files/m-p/165051#M37512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's possible that the chart hasn't finished responding to your selections by the time you export. To force it to wait for the changes to complete, use ActiveDocument.GetApplication.WaitForIdle between setting the fields and exporting the image. I'm guessing that will work. Worth trying, anyway.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 01:38:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-from-document-to-several-jpg-files/m-p/165051#M37512</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-11-26T01:38:19Z</dc:date>
    </item>
    <item>
      <title>Export from document to several jpg files</title>
      <link>https://community.qlik.com/t5/QlikView/Export-from-document-to-several-jpg-files/m-p/165052#M37513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks! That solved the problem!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 16:47:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-from-document-to-several-jpg-files/m-p/165052#M37513</guid>
      <dc:creator>ob</dc:creator>
      <dc:date>2009-11-26T16:47:08Z</dc:date>
    </item>
  </channel>
</rss>

