<?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 : Auto-select constraint</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Auto-select constraint]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 12:44:39 +0000</pubDate>
  <lastBuildDate>Wed, 14 Jan 2009 03:03:49 +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=13145</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[Auto-select constraint : If you think that such answer...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44535&amp;title=autoselect-constraint#44535</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13145<br /><strong>Posted:</strong> 14 January 2009 at 3:03am<br /><br />If you think that such answer is good for you without any details - you can get it from very begining. I consider that Forum is a school for everybody - not only for you. ]]>
   </description>
   <pubDate>Wed, 14 Jan 2009 03:03:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44535&amp;title=autoselect-constraint#44535</guid>
  </item> 
  <item>
   <title><![CDATA[Auto-select constraint : Ok, then the answer is; I&amp;#039;ve...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44533&amp;title=autoselect-constraint#44533</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 13145<br /><strong>Posted:</strong> 14 January 2009 at 2:57am<br /><br />Ok, then the answer is; I've missed something :P<DIV>&nbsp;</DIV><DIV>Thanks for the clear description!</DIV>]]>
   </description>
   <pubDate>Wed, 14 Jan 2009 02:57:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44533&amp;title=autoselect-constraint#44533</guid>
  </item> 
  <item>
   <title><![CDATA[Auto-select constraint : No - it works logically. Let&amp;#039;s...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44515&amp;title=autoselect-constraint#44515</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13145<br /><strong>Posted:</strong> 13 January 2009 at 11:32am<br /><br />No - it works logically. Let's make a sample base on ReportSample - TaskListView:<FONT color=#0000ff size=2><P>class</FONT><FONT size=2> CTaskRecord : </FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> CXTPReportRecord</P><P>{</P></FONT><FONT color=#0000ff size=2><P>protected</FONT><FONT size=2>:</P><P></FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> CTaskItemType : </FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> CXTPReportRecordItem</P><P>{</P><P></FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2>:</P><P>CTaskItemType(BOOL bSharedTask)</P><P>{</P><P>m_taskType = bSharedTask;</P><P>}</P><P></FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> OnConstraintChanged(XTP_REPORTRECORDITEM_ARGS* </FONT><FONT color=#008000 size=2>/*pItemArgs*/</FONT><FONT size=2>, CXTPReportRecordItemConstraint* pConstraint)</P><P>{</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (pConstraint)</P><P>m_taskType = (BOOL) pConstraint-&gt;m_dwData;</P><P>}</P><P>CString GetCaption(CXTPReportColumn* pColumn)</P><P>{</P><P>CXTPReportRecordItemConstraint* pConstraint = pColumn-&gt;GetEditOptions()-&gt;FindConstraint(m_taskType);</P><P>ASSERT(pConstraint);</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> pConstraint-&gt;m_strConstraint;</P><P>}</P><P>BOOL m_taskType;</P><P>};</P><DIV></DIV><DIV>.............................</DIV><DIV>&nbsp;</DIV><FONT size=2><P>CTaskRecord::CTaskRecord(</P><P>BOOL bSharedTask, TaskImportance taskImportance, BOOL bHasAttachment,</P><P>TaskStatus taskStatus, CString strSubject,</P><P>COleDateTime odtDueDate, </FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> nComplete, CString strCategories)</P><P>{</P><P>AddItem(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskItemType(bSharedTask));</P><P>AddItem(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskItemImportance(taskImportance));</P><P>AddItem(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskItemAttachment(bHasAttachment));</P><P>AddItem(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskItemStatus(taskStatus));</P><P>AddItem(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CXTPReportRecordItemText(strSubject));</P><P>AddItem(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskItemDueDate(odtDueDate));</P><P>AddItem(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskItemComplete(nComplete));</P><P>AddItem(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CXTPReportRecordItemText(strCategories));</P><P>}</P><DIV></DIV><FONT color=#0000ff size=2><P>int</FONT><FONT size=2> CTaskListView::OnCreate(LPCREATESTRUCT lpCreateStruct)</P><P>{</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (CXTPReportView::OnCreate(lpCreateStruct) == -1)</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> -1;</P><P>CXTPReportControl&amp; wndReport = GetReportCtrl();</P><P>wndReport.GetImageManager()-&gt;SetIcons(IDB_BMREPORT, 0, 0, CSize(16, 16));</P><P>CXTPReportColumn* pColumnType = wndReport.AddColumn(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CXTPReportColumn(COLUMN_TYPE, _T(</FONT><FONT color=#a31515 size=2>"Type"</FONT><FONT size=2>), 48, TRUE, 0));</P><P>pColumnType-&gt;GetEditOptions()-&gt;AddConstraint(_T(</FONT><FONT color=#a31515 size=2>"Yes"</FONT><FONT size=2>), TRUE);</P><P>pColumnType-&gt;GetEditOptions()-&gt;AddConstraint(_T(</FONT><FONT color=#a31515 size=2>"No"</FONT><FONT size=2>), FALSE);</P><P>pColumnType-&gt;GetEditOptions()-&gt;m_bConstraintEdit = TRUE;</P><P>pColumnType-&gt;GetEditOptions()-&gt;m_bAllowEdit = TRUE;</P><P>pColumnType-&gt;GetEditOptions()-&gt;AddComboButton();</P></FONT><P>......................</P><DIV></DIV><FONT size=2><P>wndReport.AddRecord(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskRecord(TRUE, taskImportanceNormal, TRUE, taskStatusInProgress, _T(</FONT><FONT color=#a31515 size=2>"Support Email: About tooltips"</FONT><FONT size=2>), dtNone, 70, _T(</FONT><FONT color=#a31515 size=2>""</FONT><FONT size=2>)));</P><P>wndReport.AddRecord(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskRecord(TRUE, taskImportanceNormal, TRUE, taskStatusNotStarted, _T(</FONT><FONT color=#a31515 size=2>"Support Email: Docking Pane ToggleDocking"</FONT><FONT size=2>), dtNone, 0, _T(</FONT><FONT color=#a31515 size=2>""</FONT><FONT size=2>)));</P><P>wndReport.AddRecord(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskRecord(TRUE, taskImportanceHigh, TRUE, taskStatusNotStarted, _T(</FONT><FONT color=#a31515 size=2>"Feature Request: New Event for CommandBars"</FONT><FONT size=2>), dtNow, 0, _T(</FONT><FONT color=#a31515 size=2>""</FONT><FONT size=2>)));</P><P>wndReport.AddRecord(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskRecord(TRUE, taskImportanceHigh, TRUE, taskStatusCompleted, _T(</FONT><FONT color=#a31515 size=2>"Support Email: Help Taskpanel And ShortcutBar"</FONT><FONT size=2>), dtNow, 100, _T(</FONT><FONT color=#a31515 size=2>""</FONT><FONT size=2>)));</P><P>wndReport.AddRecord(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskRecord(TRUE, taskImportanceNormal, FALSE, taskStatusCompleted, _T(</FONT><FONT color=#a31515 size=2>"Support Email: RE: Docking Pane Window Overlapping Issues"</FONT><FONT size=2>), dtNow, 100, _T(</FONT><FONT color=#a31515 size=2>""</FONT><FONT size=2>)));</P><P>wndReport.AddRecord(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskRecord(TRUE, taskImportanceNormal, FALSE, taskStatusCompleted, _T(</FONT><FONT color=#a31515 size=2>"Support Email: CXTPPropertyGridItem"</FONT><FONT size=2>), dtNone, 100, _T(</FONT><FONT color=#a31515 size=2>""</FONT><FONT size=2>)));</P><P>wndReport.AddRecord(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskRecord(TRUE, taskImportanceNormal, TRUE, taskStatusCompleted, _T(</FONT><FONT color=#a31515 size=2>"Support Email: Toolbar Oddity"</FONT><FONT size=2>), dtNone, 100, _T(</FONT><FONT color=#a31515 size=2>""</FONT><FONT size=2>)));</P><P>wndReport.AddRecord(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskRecord(TRUE, taskImportanceNormal, TRUE, taskStatusCompleted, _T(</FONT><FONT color=#a31515 size=2>"Support Email: CXTPTabControl"</FONT><FONT size=2>), dtNone, 100, _T(</FONT><FONT color=#a31515 size=2>""</FONT><FONT size=2>)));</P><P>wndReport.AddRecord(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskRecord(FALSE, taskImportanceNormal, TRUE, taskStatusInProgress, _T(</FONT><FONT color=#a31515 size=2>"Support Email: Menus go wrong if another form has topmost setting"</FONT><FONT size=2>), dtNone, 10, _T(</FONT><FONT color=#a31515 size=2>""</FONT><FONT size=2>)));</P><P>wndReport.AddRecord(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskRecord(FALSE, taskImportanceNormal, TRUE, taskStatusInProgress, _T(</FONT><FONT color=#a31515 size=2>"Support Email: Update Xtreme Suite from 8.6 to 8.7"</FONT><FONT size=2>), dtNone, 0, _T(</FONT><FONT color=#a31515 size=2>""</FONT><FONT size=2>)));</P><P>wndReport.AddRecord(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CTaskRecord(TRUE, taskImportanceLow, TRUE, taskStatusInProgress, _T(</FONT><FONT color=#a31515 size=2>"Support Email: Bug in Tree-View on Label Edit"</FONT><FONT size=2>), dtNone, 0, _T(</FONT><FONT color=#a31515 size=2>""</FONT><FONT size=2>)));</P><DIV>....................</DIV><DIV>&nbsp;</DIV><DIV>Now your first column automatically set Caption according of passed BOOL value (e.g. CTaskRecord(FALSE,...)</DIV></FONT></FONT></FONT>]]>
   </description>
   <pubDate>Tue, 13 Jan 2009 11:32:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44515&amp;title=autoselect-constraint#44515</guid>
  </item> 
  <item>
   <title><![CDATA[Auto-select constraint : Yes, but you&amp;#039;re missing the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44513&amp;title=autoselect-constraint#44513</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 13145<br /><strong>Posted:</strong> 13 January 2009 at 11:18am<br /><br /><DIV>Yes, but you're missing the point here. I believe there is a design flaw in XTP 12.1.1 (and earlier). Please, let me clarify what I mean.</DIV><DIV>&nbsp;</DIV><DIV><strong>Q: Record items do not auto-set their corresponding constraint value when CXTPReportControl is being populated. Is this by design?</strong></DIV><DIV>&nbsp;</DIV><DIV>I add a record:</DIV><DIV>m_wndReport.AddRecord(new CMyRecord(<strong>FALSE</strong>));</DIV><DIV>&nbsp;</DIV><DIV>In the constructor of this record:</DIV><DIV>CMyRecord::CMyRecord(BOOL enabled)</DIV><DIV>{</DIV><DIV>&nbsp;&nbsp;&nbsp; AddItem(new CMyRecordItem(enabled));</DIV><DIV>}</DIV><DIV>&nbsp;</DIV><DIV>In the constructor of that item:</DIV><DIV>CMyRecordItem::CMyRecordItem(BOOL enabled)</DIV><DIV>: CXTPReportRecordItemText()</DIV><DIV>, <strong>m_enabled</strong>(enabled)</DIV><DIV>{</DIV><DIV><FONT color=#ff0000>&nbsp;&nbsp;&nbsp; // Here it should be possible to set a value that tells XTP to</FONT></DIV><DIV><FONT color=#ff0000>&nbsp;&nbsp;&nbsp; // look up m_enabled in the constraints when populating the control!</FONT></DIV><DIV>}</DIV><DIV>&nbsp;</DIV><DIV>When I populate the report control I expect this item to automatically lookup its constraints and set the corresponding text! This does not happen, and I am forced to override Populate() and add ugly functions to get the desired behavior.</DIV><DIV>&nbsp;</DIV><DIV>Hence, either I'm missing something here, or the design is flawed.</DIV>]]>
   </description>
   <pubDate>Tue, 13 Jan 2009 11:18:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44513&amp;title=autoselect-constraint#44513</guid>
  </item> 
  <item>
   <title><![CDATA[Auto-select constraint : You can do it just after you add...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44510&amp;title=autoselect-constraint#44510</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13145<br /><strong>Posted:</strong> 13 January 2009 at 8:39am<br /><br />You can do it just after you add a column to report itself - <DIV><FONT size=2><P>CXTPReportColumn* pColumnStatus = wndReport.AddColumn(...)</P><DIV>if (pColumnStatus)</DIV><DIV><DIV></DIV><FONT size=2>pColumnStatus-&gt;GetEditOptions()-&gt;AddConstraint(...)</DIV></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Tue, 13 Jan 2009 08:39:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44510&amp;title=autoselect-constraint#44510</guid>
  </item> 
  <item>
   <title><![CDATA[Auto-select constraint : No, that won&amp;#039;t work when...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44490&amp;title=autoselect-constraint#44490</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 13145<br /><strong>Posted:</strong> 13 January 2009 at 2:41am<br /><br />No, that won't work when the constraints are set&nbsp;<U>per column</U>! I need to access the columns, and then retrieve the constraints:<DIV>&nbsp;</DIV><DIV>GetColumns()-&gt;GetColumn(3)-&gt;GetEditOptions()...</DIV><DIV>&nbsp;</DIV><DIV>But it cannot be done inside the constructor of a report record :(</DIV>]]>
   </description>
   <pubDate>Tue, 13 Jan 2009 02:41:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44490&amp;title=autoselect-constraint#44490</guid>
  </item> 
  <item>
   <title><![CDATA[Auto-select constraint :   znakeeye wrote:Where do you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44486&amp;title=autoselect-constraint#44486</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 13145<br /><strong>Posted:</strong> 12 January 2009 at 6:40pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by znakeeye" alt="Originally posted by znakeeye" style="vertical-align: text-bottom;" /> <strong>znakeeye wrote:</strong><br /><br />Where do you get the pointer to the constraints?</td></tr></table><br>pConstraints=GetEditOptions()-&gt;GetConstraints();<br><br>HTH<br>]]>
   </description>
   <pubDate>Mon, 12 Jan 2009 18:40:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44486&amp;title=autoselect-constraint#44486</guid>
  </item> 
  <item>
   <title><![CDATA[Auto-select constraint : AddConstraint return CXTPReportRecordItemConstraint*...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44484&amp;title=autoselect-constraint#44484</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13145<br /><strong>Posted:</strong> 12 January 2009 at 6:01pm<br /><br />AddConstraint return <FONT size=2>CXTPReportRecordItemConstraint* <DIV></DIV>or use <FONT size=2>CXTPReportRecordItemConstraint* pConstraint = GetEditOptions(NULL)-&gt;FindConstraint( specific Value );</FONT></FONT>]]>
   </description>
   <pubDate>Mon, 12 Jan 2009 18:01:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44484&amp;title=autoselect-constraint#44484</guid>
  </item> 
  <item>
   <title><![CDATA[Auto-select constraint : Where do you get the pointer to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44476&amp;title=autoselect-constraint#44476</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 13145<br /><strong>Posted:</strong> 12 January 2009 at 9:48am<br /><br />Where do you get the pointer to the constraints?]]>
   </description>
   <pubDate>Mon, 12 Jan 2009 09:48:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44476&amp;title=autoselect-constraint#44476</guid>
  </item> 
  <item>
   <title><![CDATA[Auto-select constraint :  Hi;I did this by calling  pC...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44472&amp;title=autoselect-constraint#44472</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 13145<br /><strong>Posted:</strong> 12 January 2009 at 9:07am<br /><br />Hi;<br><br>I did this by calling<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pConstraints-&gt;SetCurrent(xxx);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SetValue(pConstraints-&gt;GetAt(xxx));<br><br>in the constructor of my custom item class.<br>]]>
   </description>
   <pubDate>Mon, 12 Jan 2009 09:07:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13145&amp;PID=44472&amp;title=autoselect-constraint#44472</guid>
  </item> 
 </channel>
</rss>