<?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 Macro to print sheet with background in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-to-print-sheet-with-background/m-p/712820#M677569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone. Im trying to do the simplest thing with a Macro, but it seems to be impossible to get it exactly like i want it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i want is to print one sheet including the background (in my case to a PDF file).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i use this:&lt;BR /&gt;$o_document.activesheet.print&lt;/P&gt;&lt;P&gt;Then it print the sheet just fine, just without the background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then i tried this:&lt;/P&gt;&lt;P&gt;$o_document.activesheet.printout(true)&lt;BR /&gt;Then it checks the "draw background" checkbox. But this time it gives me the printer dialog. And if i just press "print", then everything works exactly as it should.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried changing the settings to the printersettings using:&lt;/P&gt;&lt;P&gt;$o_DocumentProperties = $o_document.GetProperties&lt;/P&gt;&lt;P&gt;$o_DocumentPrinterProperties = $o_DocumentProperties.PrintSheetSettings&lt;/P&gt;&lt;P&gt;$o_DocumentPrinterProperties.SheetPrintDrawBackGround = true&lt;/P&gt;&lt;P&gt;$o_document.SetProperties($o_DocumentProperties)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yet again. It works if i use printout, but that give me a print dialogbox. And if i just use print, it prints fine, but without the background.&lt;/P&gt;&lt;P&gt;Anyone have any idees or suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have looked trough the API guide, but it doesnt help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jun 2014 12:12:17 GMT</pubDate>
    <dc:creator>gustavgager</dc:creator>
    <dc:date>2014-06-19T12:12:17Z</dc:date>
    <item>
      <title>Macro to print sheet with background</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-print-sheet-with-background/m-p/712820#M677569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone. Im trying to do the simplest thing with a Macro, but it seems to be impossible to get it exactly like i want it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i want is to print one sheet including the background (in my case to a PDF file).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i use this:&lt;BR /&gt;$o_document.activesheet.print&lt;/P&gt;&lt;P&gt;Then it print the sheet just fine, just without the background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then i tried this:&lt;/P&gt;&lt;P&gt;$o_document.activesheet.printout(true)&lt;BR /&gt;Then it checks the "draw background" checkbox. But this time it gives me the printer dialog. And if i just press "print", then everything works exactly as it should.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried changing the settings to the printersettings using:&lt;/P&gt;&lt;P&gt;$o_DocumentProperties = $o_document.GetProperties&lt;/P&gt;&lt;P&gt;$o_DocumentPrinterProperties = $o_DocumentProperties.PrintSheetSettings&lt;/P&gt;&lt;P&gt;$o_DocumentPrinterProperties.SheetPrintDrawBackGround = true&lt;/P&gt;&lt;P&gt;$o_document.SetProperties($o_DocumentProperties)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yet again. It works if i use printout, but that give me a print dialogbox. And if i just use print, it prints fine, but without the background.&lt;/P&gt;&lt;P&gt;Anyone have any idees or suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have looked trough the API guide, but it doesnt help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 12:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-print-sheet-with-background/m-p/712820#M677569</guid>
      <dc:creator>gustavgager</dc:creator>
      <dc:date>2014-06-19T12:12:17Z</dc:date>
    </item>
  </channel>
</rss>

