<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Sorting Values And Captions</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Sorting Values And Captions]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 02 May 2026 00:27:57 +0000</pubDate>
  <lastBuildDate>Thu, 30 Jul 2009 06:05:54 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=14372</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Sorting Values And Captions :   Aaron wrote:Hi,   Maybe you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14372&amp;PID=51457&amp;title=sorting-values-and-captions#51457</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3822">malla00</a><br /><strong>Subject:</strong> 14372<br /><strong>Posted:</strong> 30 July 2009 at 6:05am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron" alt="Originally posted by Aaron" style="vertical-align: text-bottom;" /> <strong>Aaron wrote:</strong><br /><br />Hi, <DIV>&nbsp;</DIV><DIV>Maybe you have to approach this another way...</DIV><DIV>&nbsp;</DIV><DIV>Can you upload test project?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV></td></tr></table> <DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>Is there any solution to this?&nbsp; I am experiencing the same problem.&nbsp; I seem unable to fully sort alphabetically on a constraint column.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 30 Jul 2009 06:05:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14372&amp;PID=51457&amp;title=sorting-values-and-captions#51457</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting Values And Captions : Hi,  Maybe you have to approach...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14372&amp;PID=49552&amp;title=sorting-values-and-captions#49552</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 14372<br /><strong>Posted:</strong> 01 June 2009 at 4:09pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Maybe you have to approach this another way...</DIV><DIV>&nbsp;</DIV><DIV>Can you upload test project?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 01 Jun 2009 16:09:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14372&amp;PID=49552&amp;title=sorting-values-and-captions#49552</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting Values And Captions : Hi Aaron,  thanx for theanswer. I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14372&amp;PID=49509&amp;title=sorting-values-and-captions#49509</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5260">zorknemesis</a><br /><strong>Subject:</strong> 14372<br /><strong>Posted:</strong> 30 May 2009 at 12:18pm<br /><br />Hi Aaron,<DIV>&nbsp;</DIV><DIV>thanx for the&nbsp;answer.</DIV><DIV>I already tried the workaround with sortpriority, and I also tried to use the AscB-Function.</DIV><DIV>But if you work with AscB, only the first letter in the caption is converted to a sortable number-value!</DIV><DIV>The result is a not properly sorted column if&nbsp;there are&nbsp;captions with the same first letter in it. <img src="http://forum.codejock.com/smileys/smiley19.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>AND:</DIV><DIV>If you would like to set "sortpriority" programmatically for the needed recItems AFTER you have already&nbsp;filled the recportcontrol, and you walk through the records for setting the "sortpriority" </DIV><DIV>like this:</DIV><DIV>&nbsp;</DIV><DIV>for each record in wndReportControl.records</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set&nbsp;recItem = record.item(x)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recItem.SortPriority = AscB(recItem.Caption)</DIV><DIV>&nbsp;</DIV><DIV>next record</DIV><DIV>&nbsp;</DIV><DIV>then the SortPriority from those recItems which are "out of sight" (at the end of the list) are incorretly set by the recItem.Value.</DIV><DIV>btw: the recItems are having constraints!</DIV><DIV>&nbsp;</DIV><DIV>Aren't&nbsp;there&nbsp;properties to set the column-sorting to the "value" OR to the "caption"???</DIV>]]>
   </description>
   <pubDate>Sat, 30 May 2009 12:18:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14372&amp;PID=49509&amp;title=sorting-values-and-captions#49509</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting Values And Captions : Hi,  You can use SortPriority...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14372&amp;PID=49508&amp;title=sorting-values-and-captions#49508</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 14372<br /><strong>Posted:</strong> 30 May 2009 at 10:08am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>You can use SortPriority property for this kind of sorting. Assign (<strong>integer</strong>) values to SortPriority and you can sort captions&nbsp;properly <img src="https://forum.codejock.com/smileys/smiley2.gif" border="0"></DIV><DIV>If I understand correct you want to show the surname (Item.Caption) and Lastname would be Item.Value, correct? Now adding items like this:</DIV><DIV>&nbsp;</DIV><DIV>Set rec = wndReportControl.Records.Add()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set recItem = rec.AddItem("B...")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; recItem.Caption = "Aaron"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; recItem.SortPriority = AscB(recItem.Caption)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set rec = wndReportControl.Records.Add()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set recItem = rec.AddItem("A...")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; recItem.Caption = "SuperMario"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; recItem.SortPriority = AscB(recItem.Caption)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set rec = wndReportControl.Records.Add()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set recItem = rec.AddItem("N...")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; recItem.Caption = "Zork"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; recItem.SortPriority = AscB(recItem.Caption)<BR>&nbsp;&nbsp;&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>doesn't sort items properly (<strong>comment code with recItem.SortPriority</strong>) :</DIV><DIV>Asc:</DIV><DIV>1 &gt; Supermario (Item.Value = A...)</DIV><DIV>2 &gt; Aaron&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Item.Value = B...)</DIV><DIV>3 &gt; Zork&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Item.Value = N...)</DIV><DIV>&nbsp;</DIV><DIV><DIV><DIV>Desc:</DIV><DIV>1 &gt; Zork&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Item.Value = N...)</DIV><DIV>2 &gt; Aaron&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Item.Value = B...)</DIV><DIV>3 &gt; Supermario (Item.Value = A...)</DIV><DIV>&nbsp;</DIV></DIV></DIV><DIV>proper sort on Item.Value though <img src="http://forum.codejock.com/smileys/smiley2.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>Now run again with code <strong>recItem.SortPriority</strong></DIV><DIV>&nbsp;</DIV><DIV>Note: If you change Item.Caption you have to change&nbsp;Item.<strong>SortPriority</strong> as well </DIV><DIV>&nbsp;</DIV><DIV>or place code in&nbsp;BeforeDrawRow event: <strong>Item.SortPriority = AscB(Item.Caption)</strong></DIV><DIV><strong></strong>&nbsp;</DIV><DIV><strong></strong>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 30 May 2009 10:08:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14372&amp;PID=49508&amp;title=sorting-values-and-captions#49508</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting Values And Captions : Hello!   We need to sort a column...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14372&amp;PID=49298&amp;title=sorting-values-and-captions#49298</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5260">zorknemesis</a><br /><strong>Subject:</strong> 14372<br /><strong>Posted:</strong> 24 May 2009 at 2:45am<br /><br />Hello! <DIV>&nbsp;</DIV><DIV>We need to sort a column which contains contact-numbers. </DIV><DIV>The&nbsp;item/field contains constraints, which data-key corresponds with the item.value. The&nbsp;caption-string from the constraint displays the surname and given name from the underlying item.value.</DIV><DIV>The ReportControl displays the name of the contact correctly. But when we re-sort the column by clicking the column-caption, the column is sorted by the underlying item.value and not by the needed caption from the constraint!</DIV><DIV>&nbsp;</DIV><DIV>We urgently need a workaround to this behavior! Can anyone help us?</DIV>]]>
   </description>
   <pubDate>Sun, 24 May 2009 02:45:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14372&amp;PID=49298&amp;title=sorting-values-and-captions#49298</guid>
  </item> 
 </channel>
</rss>