<?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 : iterating items</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : iterating items]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 27 Apr 2026 14:19:08 +0000</pubDate>
  <lastBuildDate>Tue, 02 May 2006 05:21:50 +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=4080</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[iterating items : No problem, firstly look at help...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12571&amp;title=iterating-items#12571</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4080<br /><strong>Posted:</strong> 02 May 2006 at 5:21am<br /><br />No problem, firstly look at help files to see the difference between Record and a Row. <br><br>Iterating difference is in their order. If you iterate Records, you'll take them in the order like you were adding them into the control. If you iterate Rows, they go in order like they're displayed. <br><br>Here is the example (add there NULL checks, etc):<br><table width="99%"><tr><td><pre class="BBcode"><br>CXTPReportRows* pRows = wndReport.GetRows();<br>for(int j = 0; j &lt; pRows-&gt;GetCount(); j++)<br>{<br>&nbsp;&nbsp;&nbsp; CXTPReportRow* pRow = pRows-&gt;GetAt(j);<br>&nbsp;&nbsp;&nbsp; CXTPReportRecord* pRecord = pRow-&gt;GetRecord();<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; pRecord-&gt;GetItemCount(); i++)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPReportRecordItem* pItem = pRecord-&gt;GetItem(i);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (pItem)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ASSERT(pItem-&gt;GetCaption(NULL).IsEmpty());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>}<br></pre></td></tr></table><br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Tue, 02 May 2006 05:21:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12571&amp;title=iterating-items#12571</guid>
  </item> 
  <item>
   <title><![CDATA[iterating items : thanx sserge,  this does what...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12567&amp;title=iterating-items#12567</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1949">adico</a><br /><strong>Subject:</strong> 4080<br /><strong>Posted:</strong> 01 May 2006 at 7:36pm<br /><br />thanx <span style="font-weight: normal;" ="bold">sserge,<br><br>this does what i want (after some minor modifications).<img src="http://forum.codejock.com/smileys/smiley32.gif" border="0"><br><br>could you elaborate (maybe provide an example) on what you mean by iterating ReportRows?<br><br>thnx<br><br><br></span>]]>
   </description>
   <pubDate>Mon, 01 May 2006 19:36:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12567&amp;title=iterating-items#12567</guid>
  </item> 
  <item>
   <title><![CDATA[iterating items :  Your code above has an error....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12562&amp;title=iterating-items#12562</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4080<br /><strong>Posted:</strong> 01 May 2006 at 5:29pm<br /><br />Your code above has an error. GetRecords() returns a collection of records, not just a single one. So far, to iterate all records and then items it would be:<br><table width="99%"><tr><td><pre class="BBcode"><br>&nbsp;&nbsp;&nbsp; CXTPReportRecords* pRecords = wndReport.GetRecords();<br>&nbsp;&nbsp;&nbsp; CXTPReportRecord* pRecord = NULL;<br><br>&nbsp;&nbsp;&nbsp; int nRecordCnt = pRecords-&gt;GetCount();<br>&nbsp;&nbsp;&nbsp; for(int i = 0; i &lt; nRecordCnt; i++)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pRecord = pRecords-&gt;GetAt(i);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // there goes my previous piece of code<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPReportRecordItem* pItem = NULL;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (int j = 0; j &lt; pRecord-&gt;GetItemCount(); j++)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pItem = pRecord-&gt;GetItem(j);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (pItem)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ASSERT(pItem-&gt;GetCaption(NULL).IsEmpty());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }<br></pre></td></tr></table><br><br>ps: by your description, you probably need to iterate ReportRows, and only then take and check a Record from a Row.<br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Mon, 01 May 2006 17:29:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12562&amp;title=iterating-items#12562</guid>
  </item> 
  <item>
   <title><![CDATA[iterating items : Sserge, thanx for your reply....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12559&amp;title=iterating-items#12559</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1949">adico</a><br /><strong>Subject:</strong> 4080<br /><strong>Posted:</strong> 01 May 2006 at 11:03am<br /><br />Sserge, thanx for your reply. However it doesn't seem to do what I want. Here is the code:<br><br>&nbsp;&nbsp;&nbsp; CXTPReportRecordItem* pItem = NULL;<br>&nbsp;&nbsp; CXTPReportRecord* pRecord =&nbsp; (CXTPReportRecord*)m_wndReport.GetRecords();<br><br>&nbsp;&nbsp;&nbsp; int nItemCnt = pRecord-&gt;GetItemCount();<br><br>&nbsp;&nbsp;&nbsp; for(int i = 0; i &lt; nItemCnt; i++)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pItem = pRecord-&gt;GetItem(i);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(pItem)&nbsp;&nbsp; // IT NEVER GETS INSIDE HERE<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ASSERT(pItem-&gt;GetCaption(NULL).IsEmpty());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br>it never gets inside the if(pItem) statement.<br><br>am i missing something?<br><br>Basically this is what I want to do: when the user clicks on a button,i want to get a total count of all the rows in the report. thenstarting with the first row, i want to iterate thru all the items &amp;find out if there are any empty items. if so, i want to break out ofthe look &amp; set focus (maybe change the cell color) to the firstempty item. <br>]]>
   </description>
   <pubDate>Mon, 01 May 2006 11:03:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12559&amp;title=iterating-items#12559</guid>
  </item> 
  <item>
   <title><![CDATA[iterating items : Hi,If you have a record pointer,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12510&amp;title=iterating-items#12510</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4080<br /><strong>Posted:</strong> 28 April 2006 at 3:47pm<br /><br />Hi,<br><br>If you have a record pointer, you can iterate it in a very simple manner:<br><table width="99%"><tr><td><pre class="BBcode"><br>CXTPReportRecordItem* pItem = NULL;<br>for (int i = 0; i &lt; pRecord-&gt;GetItemCount(); i++)<br>{<br>&nbsp;&nbsp;&nbsp; pItem = pRecord-&gt;GetItem(i);<br>&nbsp;&nbsp;&nbsp; if (pItem)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ASSERT(pItem-&gt;GetCaption(NULL).IsEmpty());<br>&nbsp;&nbsp;&nbsp; }<br>}<br></pre></td></tr></table><br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Fri, 28 Apr 2006 15:47:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12510&amp;title=iterating-items#12510</guid>
  </item> 
  <item>
   <title><![CDATA[iterating items :   i am looking for a good example...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12490&amp;title=iterating-items#12490</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1949">adico</a><br /><strong>Subject:</strong> 4080<br /><strong>Posted:</strong> 28 April 2006 at 12:04am<br /><br />i am looking for a good example (vc++) on how to iterate through every single item(column) on a record (row).<br><br>i can get the row, but i want to scan every item &amp; find out which item is empty (" ").<br><br><br>Thanx in advance<br><br>&nbsp;]]>
   </description>
   <pubDate>Fri, 28 Apr 2006 00:04:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4080&amp;PID=12490&amp;title=iterating-items#12490</guid>
  </item> 
 </channel>
</rss>