<?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 AW:Re: How to sort (descending) straight table with macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-sort-descending-straight-table-with-macro/m-p/232107#M502866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Think we knew this before.&lt;/P&gt;&lt;P&gt;I have an object to show in QV with font-size 9 and the same object to use as printreport font-size 6 to fit on page. Users should not see the reportobjects. So I have to read sort from QV-shown-object and send it to my report-object.&lt;/P&gt;&lt;P&gt;You have better solution for this without macro...? I need one.&lt;/P&gt;&lt;P&gt;Greetings,&lt;BR /&gt;Jonas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Aug 2010 11:23:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-08-18T11:23:09Z</dc:date>
    <item>
      <title>How to sort (descending) straight table with macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sort-descending-straight-table-with-macro/m-p/232103#M502862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to have "default sort" for straight table. I can't use simple sort, because user must be able to sort the table if he wants. So I need functionality to automatically change sort of first column when user opens table.&lt;/P&gt;&lt;P&gt;I was looking at API, but only found SortBy. Is there any function where you can specify what kind of sort you need - I need DESCENDING sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Miha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jul 2010 14:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sort-descending-straight-table-with-macro/m-p/232103#M502862</guid>
      <dc:creator />
      <dc:date>2010-07-23T14:40:04Z</dc:date>
    </item>
    <item>
      <title>How to sort (descending) straight table with macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sort-descending-straight-table-with-macro/m-p/232104#M502863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So far - I've come to a solution:&lt;/P&gt;&lt;P&gt;Sub Sort_CH27&lt;BR /&gt; set tablebox = ActiveDocument.GetSheetObject("CH27")&lt;BR /&gt; tablebox.SortBy 2 ' ASC&lt;BR /&gt; tablebox.SortBy 2 ' DESC&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;But this is not OK; If user sorts the table ASC, the next time it will be sorted ASC again, not DESC.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Miha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jul 2010 14:41:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sort-descending-straight-table-with-macro/m-p/232104#M502863</guid>
      <dc:creator />
      <dc:date>2010-07-23T14:41:25Z</dc:date>
    </item>
    <item>
      <title>AW:Re: How to sort (descending) straight table with macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sort-descending-straight-table-with-macro/m-p/232105#M502864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I used your code to get to my solution for the same problem. Here is my workin solution:&lt;/P&gt;&lt;P&gt;sub Sort&lt;BR /&gt; set a = ActiveDocument.Variables("varLastSortMenge")&lt;BR /&gt; var1 = a.GetContent.String&lt;BR /&gt;&lt;BR /&gt; set quelle1 = ActiveDocument.GetSheetObject("CH45")&lt;BR /&gt; sort1 = quelle1.GetProperties.TableProperties.InterFieldSortOrder&lt;BR /&gt; ord1 = CStr(sort1(lbound(sort1)))&lt;BR /&gt;&lt;BR /&gt; set ziel1 = ActiveDocument.GetSheetObject("CH60")&lt;BR /&gt; if var1 = ord1 then&lt;BR /&gt; ziel1.SortBy ord1&lt;BR /&gt; end if&lt;BR /&gt; ziel1.SortBy ord1&lt;BR /&gt;&lt;BR /&gt; ActiveDocument.Variables("varLastSortMenge").SetContent ord1, true&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;Hope I could help. Variable in document musst be set before... but this is self-explanatory...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 10:16:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sort-descending-straight-table-with-macro/m-p/232105#M502864</guid>
      <dc:creator />
      <dc:date>2010-08-18T10:16:02Z</dc:date>
    </item>
    <item>
      <title>How to sort (descending) straight table with macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sort-descending-straight-table-with-macro/m-p/232106#M502865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a straight table you can sort any column(it is by default).&lt;/P&gt;&lt;P&gt;So rather than definging a macro go to chart properties --&amp;gt;sort --&amp;gt;select 1st dimension (for which you wanna apply default sorting) Keep it at the top --&amp;gt;select descending(if numeric field) or Z-A(if text field).&lt;/P&gt;&lt;P&gt;then save your document.&lt;/P&gt;&lt;P&gt;Next time when you will open the document you will have desired sorted table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 11:08:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sort-descending-straight-table-with-macro/m-p/232106#M502865</guid>
      <dc:creator />
      <dc:date>2010-08-18T11:08:00Z</dc:date>
    </item>
    <item>
      <title>AW:Re: How to sort (descending) straight table with macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sort-descending-straight-table-with-macro/m-p/232107#M502866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Think we knew this before.&lt;/P&gt;&lt;P&gt;I have an object to show in QV with font-size 9 and the same object to use as printreport font-size 6 to fit on page. Users should not see the reportobjects. So I have to read sort from QV-shown-object and send it to my report-object.&lt;/P&gt;&lt;P&gt;You have better solution for this without macro...? I need one.&lt;/P&gt;&lt;P&gt;Greetings,&lt;BR /&gt;Jonas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 11:23:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sort-descending-straight-table-with-macro/m-p/232107#M502866</guid>
      <dc:creator />
      <dc:date>2010-08-18T11:23:09Z</dc:date>
    </item>
  </channel>
</rss>

