<?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 Print All Reports Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Print-All-Reports-Macro/m-p/166516#M38437</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am attempting to create a Macro that will print all Reports within a .QVW. I can easily create a macro that looks like this:&lt;/P&gt;&lt;P&gt;Sub Print_Reports&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;ActiveDocument.PrintReport "RP01"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;ActiveDocument.PrintReport "RP02"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;ActiveDocument.PrintReport "RP03"&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;But, what if I add another Report? I would have to remember to add it to the macro.&lt;/P&gt;&lt;P&gt;What I would like to do is loop thru an array of the Reports and print each. Something like this:&lt;/P&gt;&lt;P&gt;Sub Print_Reports&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Set reps = ActiveDocument.GetDocReports&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;For i = 0 to reps.Count - 1&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;Set rep = reps.Item(i)&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;ActiveDocument.PrintReport rep&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Next&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;However, this doesn't work. It doesn't like the syntax of "ActiveDocument.PrintReport &lt;STRONG&gt;rep&lt;/STRONG&gt;". How do I call each report in proper syntax?&lt;/P&gt;&lt;P&gt;Thanx&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;&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;BR /&gt;&lt;BR /&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Nov 2010 15:07:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-01T15:07:26Z</dc:date>
    <item>
      <title>Print All Reports Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Print-All-Reports-Macro/m-p/166516#M38437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am attempting to create a Macro that will print all Reports within a .QVW. I can easily create a macro that looks like this:&lt;/P&gt;&lt;P&gt;Sub Print_Reports&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;ActiveDocument.PrintReport "RP01"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;ActiveDocument.PrintReport "RP02"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;ActiveDocument.PrintReport "RP03"&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;But, what if I add another Report? I would have to remember to add it to the macro.&lt;/P&gt;&lt;P&gt;What I would like to do is loop thru an array of the Reports and print each. Something like this:&lt;/P&gt;&lt;P&gt;Sub Print_Reports&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Set reps = ActiveDocument.GetDocReports&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;For i = 0 to reps.Count - 1&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;Set rep = reps.Item(i)&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;ActiveDocument.PrintReport rep&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Next&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;However, this doesn't work. It doesn't like the syntax of "ActiveDocument.PrintReport &lt;STRONG&gt;rep&lt;/STRONG&gt;". How do I call each report in proper syntax?&lt;/P&gt;&lt;P&gt;Thanx&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;&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;BR /&gt;&lt;BR /&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 15:07:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Print-All-Reports-Macro/m-p/166516#M38437</guid>
      <dc:creator />
      <dc:date>2010-11-01T15:07:26Z</dc:date>
    </item>
    <item>
      <title>Print All Reports Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Print-All-Reports-Macro/m-p/166517#M38438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;Set rep = reps.Item(i).text&lt;/P&gt;&lt;P&gt;ActiveDocument.PrintReport rep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 15:48:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Print-All-Reports-Macro/m-p/166517#M38438</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-11-01T15:48:18Z</dc:date>
    </item>
    <item>
      <title>Print All Reports Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Print-All-Reports-Macro/m-p/166518#M38439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry..no joy. It doesn't like the syntax "Set rep = reps.Item(i).text"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 16:03:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Print-All-Reports-Macro/m-p/166518#M38439</guid>
      <dc:creator />
      <dc:date>2010-11-01T16:03:47Z</dc:date>
    </item>
    <item>
      <title>Print All Reports Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Print-All-Reports-Macro/m-p/166519#M38440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;For i = 0 to reps.Count - 1&lt;/P&gt;&lt;P style="padding-left:60px;"&gt;ActiveDocument.PrintReport reps.Item(i).text&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Next&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 16:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Print-All-Reports-Macro/m-p/166519#M38440</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-11-01T16:07:54Z</dc:date>
    </item>
    <item>
      <title>Print All Reports Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Print-All-Reports-Macro/m-p/166520#M38441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it to work. Here's the syntax:&lt;/P&gt;&lt;P&gt;"ActiveDocument.PrintReport &lt;STRONG&gt;rep.id&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;Thanx for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 16:23:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Print-All-Reports-Macro/m-p/166520#M38441</guid>
      <dc:creator />
      <dc:date>2010-11-01T16:23:08Z</dc:date>
    </item>
  </channel>
</rss>

