<?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 : Sort with &quot;no value&quot; content</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Sort with &quot;no value&quot; content]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 00:14:24 +0000</pubDate>
  <lastBuildDate>Mon, 04 Jan 2010 14:35:42 +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=15949</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[Sort with &quot;no value&quot; content :  Q: Is there a mechanism to take...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15949&amp;PID=55972&amp;title=sort-with-no-value-content#55972</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2657">Algae</a><br /><strong>Subject:</strong> 15949<br /><strong>Posted:</strong> 04 January 2010 at 2:35pm<br /><br />Q: Is there a mechanism to take into account "no value" items in a numeric sort column?<br>A: Apparently there's no numeric "no value" mechanism, so here's the modification I used:<br><br>File: XTPReportRecordItemText.cpp<br>Method: CXTPReportRecordItemNumber::Compare<br><br>int CXTPReportRecordItemNumber::Compare(CXTPReportColumn*, CXTPReportRecordItem* pItem)<br>{<br>&nbsp;&nbsp;&nbsp; CXTPReportRecordItemNumber* pItemNumber = DYNAMIC_DOWNCAST(CXTPReportRecordItemNumber, pItem);<br>&nbsp;&nbsp;&nbsp; if (!pItemNumber)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return 1;<br>// Change to 1 - for sparse sorting<br>//&nbsp;&nbsp;&nbsp; &nbsp; return 0;<br><br>&nbsp;&nbsp;&nbsp; if (m_dValue == pItemNumber-&gt;m_dValue)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return 0;<br>&nbsp;&nbsp;&nbsp; else if (m_dValue &gt; pItemNumber-&gt;m_dValue)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return 1;<br>&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return -1;<br>}<br><br>For example I have a numeric column. If the value is 0, I don't want to show a value, but rather a blank. Of course the columns must be numeric and not strings to sort properly! <br><br>By default when using a numeric item with a 0 value a value of 0 will display. The obvious solution is to set the item to a default item in the record instead of a numeric item so no value is shown. However, there's where the problem comes in.<br><br>If you use a non-numeric item sorting is jumbled since a non-numeric "no value" item is considered equal in the compare routine,<br><br><br><br>]]>
   </description>
   <pubDate>Mon, 04 Jan 2010 14:35:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15949&amp;PID=55972&amp;title=sort-with-no-value-content#55972</guid>
  </item> 
 </channel>
</rss>