<?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 : Problem with CXTPReportRecordItemDateTime</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Problem with CXTPReportRecordItemDateTime]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 20:27:35 +0000</pubDate>
  <lastBuildDate>Mon, 16 Nov 2009 18:53:26 +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=15627</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[Problem with CXTPReportRecordItemDateTime : Just spend a few hours trying...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15627&amp;PID=54902&amp;title=problem-with-cxtpreportrecorditemdatetime#54902</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4876">unknow</a><br /><strong>Subject:</strong> 15627<br /><strong>Posted:</strong> 16 November 2009 at 6:53pm<br /><br />Just spend a few hours trying to find the problem, creating new classes etc... without success, until I found that... <DIV>&nbsp;</DIV><DIV>What makes the reportcontrol goes mad is to group by such a string (loaded with ID from resources) :&nbsp;"<strong>Time: &gt; 90 and &lt; 120 minutes</strong>" </DIV><DIV>&nbsp;</DIV><DIV>Why is that ??</DIV>]]>
   </description>
   <pubDate>Mon, 16 Nov 2009 18:53:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15627&amp;PID=54902&amp;title=problem-with-cxtpreportrecorditemdatetime#54902</guid>
  </item> 
  <item>
   <title><![CDATA[Problem with CXTPReportRecordItemDateTime : Hi. I have a big issue with CXTPReportRecordItemDateTime...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15627&amp;PID=54858&amp;title=problem-with-cxtpreportrecorditemdatetime#54858</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4876">unknow</a><br /><strong>Subject:</strong> 15627<br /><strong>Posted:</strong> 15 November 2009 at 1:03pm<br /><br />Hi. I have a big issue with CXTPReportRecordItemDateTime class; <DIV>&nbsp;</DIV><DIV>- I am using this class to display the hour within the ReportControl and sort by time range (60,90,120,&gt;120 minutes)</DIV><DIV>- The problem occurs when I group the column headers with the field corresponding to this item</DIV><DIV>- the ReportControls reflect the changes and create groups&nbsp;according to the times comparison routine</DIV><DIV>- IF there is more than 2 groups, when I click an item, or give the focus to another application, the software goes mad, loops indefinitely and loads hundreds of megabytes in memory</DIV><DIV>- If there is only 1 group (example items with the same time value), the problem doesn't occur.</DIV><DIV>&nbsp;</DIV><DIV>I think the problem comes from the sorting / priority order used by the ReportControl because if the GetGroupCaptionID function just returns -1, I obtain a group for each different value, but... it works!</DIV><DIV>&nbsp;</DIV><DIV>I've tried everything like using SetGroupPriority, SetSortPriority etc... but nothing seems to work..</DIV><DIV>&nbsp;</DIV><DIV>I'm using the exact same class to group by DATE and it works, so I really don't understand what is wrong !?</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#ff0000>Here's the class, PLEASE any help is greatly appreciated ! I'm thinking about opening a case, but I guess I'm just forgetting to set something !?</FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff>class </FONT>CMessageRecordItemTime : <FONT color=#0000cc>public </FONT>CXTPReportRecordItemDateTime<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DECLARE_SERIAL(CMessageRecordItemTime)<BR><FONT color=#0000cc>public</FONT>:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMessageRecordItemTime(COleDateTime odtValue = COleDateTime::GetCurrentTime());</DIV><DIV><FONT color=#0000cc><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>virtual int</FONT> GetGroupCaptionID(CXTPReportColumn* pColumn);<BR>};</DIV><DIV><BR>&nbsp;</DIV><DIV>CMessageRecordItemTime::CMessageRecordItemTime(COleDateTime odtValue)<BR>&nbsp;: CXTPReportRecordItemDateTime(odtValue)<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;SetFormatString<FONT color=#ff0000>("%H:%M:%S</FONT>");<BR>}<BR></DIV><DIV><FONT color=#0000ff></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff>int </FONT>CMessageRecordItemTime::GetGroupCaptionID(CXTPReportColumn* /*pColumn*/)<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (m_odtValue.GetStatus() != COleDateTime::valid)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return IDS_TXTNONE;</DIV><DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int nLen = (m_odtValue.GetHour()*60) + m_odtValue.GetMinute();</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (nLen &gt; 120)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return IDS_GROUP_TIME_XXXMIN;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (nLen &gt; 90)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return IDS_GROUP_TIME_90MIN;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT color=#0000ff>return </FONT>IDS_GROUP_TIME_60MIN;<BR>}<BR></DIV><DIV>&nbsp;</DIV><DIV><U>IDS Values are: </U></DIV><DIV>IDS_GROUP_TIME_60MIN = 2003</DIV><DIV><DIV>IDS_GROUP_TIME_90MIN = 2002</DIV><DIV>IDS_GROUP_TIME_120MIN = 2001</DIV>IDS_GROUP_TIME_XXXMIN = 2000</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 15 Nov 2009 13:03:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15627&amp;PID=54858&amp;title=problem-with-cxtpreportrecorditemdatetime#54858</guid>
  </item> 
 </channel>
</rss>