<?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 currency columns</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Sorting currency columns]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 17:15:14 +0000</pubDate>
  <lastBuildDate>Mon, 05 Dec 2011 10:46:07 +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=19257</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 currency columns : Thanks to both contributors on...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19257&amp;PID=67035&amp;title=sorting-currency-columns#67035</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6827">PurposeSoftware</a><br /><strong>Subject:</strong> 19257<br /><strong>Posted:</strong> 05 December 2011 at 10:46am<br /><br />Thanks to both contributors on this.<div><br></div><div>A mixture of both answers has sorted the problem.</div><div><br></div><div>Ultimately it seemed that the setting of the Item.Value in the _ValueChanged event causes the sorting to go wrong.</div><div><br></div><div>Thanks again for the very fast response.</div><div><br></div><div>Cheers, Col</div>]]>
   </description>
   <pubDate>Mon, 05 Dec 2011 10:46:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19257&amp;PID=67035&amp;title=sorting-currency-columns#67035</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting currency columns : I have tried adding Aaron&amp;#039;s...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19257&amp;PID=67031&amp;title=sorting-currency-columns#67031</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6827">PurposeSoftware</a><br /><strong>Subject:</strong> 19257<br /><strong>Posted:</strong> 05 December 2011 at 4:38am<br /><br />I have tried adding Aaron's suggestion to my CodeJockReportV1.zip project (don't know if you received that as I can't see it above - even though I am sure I posted it).<div><br></div><div>However that doesn't allow sorting to work. Still get 200 in the middle.</div><div><br></div><div>Will now try jbpro's suggestion.</div>]]>
   </description>
   <pubDate>Mon, 05 Dec 2011 04:38:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19257&amp;PID=67031&amp;title=sorting-currency-columns#67031</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting currency columns : Hi,  Easiest way, to prevent...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19257&amp;PID=67019&amp;title=sorting-currency-columns#67019</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 19257<br /><strong>Posted:</strong> 03 December 2011 at 12:49pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Easiest way, to prevent showing '0' &nbsp;is to use Metrics.Text in BeforeDrawRow event </DIV><DIV>&nbsp;</DIV><DIV>' ** CODE ADDED HERE<BR>&nbsp;&nbsp;&nbsp; If Item.Index = clmPriceFixed Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Item.Value &lt;&gt; "" Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Item.Value &lt;&gt; 0 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.Caption = Format(Trim(Item.Value), "##0.#0")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><FONT color=#0000cc>Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Metrics.Text = ""<BR></FONT></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; ' ** CODE END</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 03 Dec 2011 12:49:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19257&amp;PID=67019&amp;title=sorting-currency-columns#67019</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting currency columns : I&amp;#039;ve put together a little...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19257&amp;PID=67012&amp;title=sorting-currency-columns#67012</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 19257<br /><strong>Posted:</strong> 02 December 2011 at 11:27pm<br /><br />I've put together a little sample to demonstrate what I think you are looking for:<br><br><a href="uploads/2676/ReportSwapEdit.zip" target="_blank">uploads/2676/ReportSwapEdit.zip</a><br><br>I used Currency values for the numbers (instead of double), and empty strings instead of NULL values. I did this because when I tried using NULL for field values, the RC was randomly sorting the NULL values interspersed with the&nbsp; number values. <b>This appears to be a bug</b>.<br><br>Does this help, or have I misunderstood your requirements?<br>]]>
   </description>
   <pubDate>Fri, 02 Dec 2011 23:27:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19257&amp;PID=67012&amp;title=sorting-currency-columns#67012</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting currency columns : I have 2 columns of currency type.And...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19257&amp;PID=67006&amp;title=sorting-currency-columns#67006</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6827">PurposeSoftware</a><br /><strong>Subject:</strong> 19257<br /><strong>Posted:</strong> 02 December 2011 at 11:33am<br /><br />I have 2 columns of currency type.<div>And the user is required to enter a value in either column but not both.</div><div>So when they enter a value in either of the cells the other cell gets set to null (blanked).</div><div><br></div><div>The problem we had was with sorting the currency.</div><div>If I entered 10.00 on the first row, 200.00 on the second and 30.00 on the third the sorting would put the 200.00 in the middle.</div><div><br></div><div>So looking at examples on the forum, I changed the item.value to be double and not string. This resolves the sorting issue but I now cannot have a null cell on that column. Further examples in the forum state I can use the item.caption but this seems not the best way to do it as the item.value may get changed in code and the new value is not reflected on the grid. It also causes problems with formatting.</div><div><br></div><div>The attached examples are:</div><div>CodeJockReportV1.zip - shows the way it originally worked setting a cell to blank when the other is entered.</div><div>Enter data as :</div><div>A &lt;tab&gt; 10 &lt;cr&gt;</div><div>B &lt;tab&gt; 200&nbsp;&lt;cr&gt;</div><div>C &lt;tab&gt; 30&nbsp;&lt;cr&gt;</div><div><br></div><div>Sort the Fixed Price column by clicking the column header.</div><div>Notice that the order is wrong.</div><div><br></div><div>Also notice how we want it to work, ie. enter a value in the Fixed Price column, then move to the Discount column and enter a value in there. It clears out the Fixed Price cell. And vice versa.</div><div><br></div><div>So, the second example attached (CodeJockReportV2.zip) was an attempt to resolve the issue.</div><div>The only differences are :</div><div>1. AddRecordPart adds the FixedPrice as double and not a string</div><div>2. ClearHeaderRow defaults the FixedPrice to zero from null.</div><div>3. _BeforeDrawRow formats the value</div><div><br></div><div>But I cannot get it to null the other column's cell data and format the number.</div><div>Sometimes when entering 8.87 it rounds up to 9.00 but you may not experience this once written correctly.<a href="uploads/6827/CodeJockReportV2.zip" target="_blank">uploads/6827/CodeJockReportV2.zip</a></div>]]>
   </description>
   <pubDate>Fri, 02 Dec 2011 11:33:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19257&amp;PID=67006&amp;title=sorting-currency-columns#67006</guid>
  </item> 
 </channel>
</rss>