<?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 : Report c&#111;ntrol: add records &amp; field order</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Suite Pro : Report c&#111;ntrol: add records &amp; field order]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 27 May 2026 11:27:33 +0000</pubDate>
  <lastBuildDate>Sat, 13 Nov 2004 17:45: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=1380</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[Report c&#111;ntrol: add records &amp; field order : Unfortunately, it doesn&amp;#039;t...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1380&amp;PID=3979&amp;title=report-control-add-records-field-order#3979</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=570">nighthawk</a><br /><strong>Subject:</strong> 1380<br /><strong>Posted:</strong> 13 November 2004 at 5:45pm<br /><br />Unfortunately, it doesn't look like it is as simple as you say.&nbsp;It looks like the ReportRecordItem objects are added in the order ofthe columns ItemIndex value, not just in the order that the columns areadded.&nbsp; I thought the ItemIndex value was just an arbitraryidentifier so I was using an enum with high values just to ensure allcolumns on all tables had a unique ID number.&nbsp; That doesn't workbecause the ItemIndex must start at 0.&nbsp; It took me a while tofigure this out.<br><br>For example, the following code will add the ReportRecordItems correctly as expected:<br><br>wndReportControl.Columns.Add(0, "Subject", 50, True)<br>wndReportControl.Columns.Add(1, "From", 50, True)<br>wndReportControl.Columns.Add(2, "Date", 50, True)<br>wndReportControl.Columns.Add(3, "Size", 50, True)<br>Record.Add Item "RE: Your Invoice"<br>Record.Add Item "John Smith"<br>Record.Add Item "19/06/2004"<br>Record.Add Item "18k"<br><br><br>But the following also looks like it will add the ReportRecordItemscorrectly even the the columns are added in reverse order since theirItemIndex value didn't change:<br><br>wndReportControl.Columns.Add(3, "Size", 50, True)<br>wndReportControl.Columns.Add(2, "Date", 50, True)<br>wndReportControl.Columns.Add(1, "From", 50, True)<br>wndReportControl.Columns.Add(0, "Subject", 50, True)<br>Record.Add Item "RE: Your Invoice"<br>Record.Add Item "John Smith"<br>Record.Add Item "19/06/2004"<br>Record.Add Item "18k"<br>]]>
   </description>
   <pubDate>Sat, 13 Nov 2004 17:45:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1380&amp;PID=3979&amp;title=report-control-add-records-field-order#3979</guid>
  </item> 
  <item>
   <title><![CDATA[Report c&#111;ntrol: add records &amp; field order : It doesn&amp;#039;t matter how much...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1380&amp;PID=3895&amp;title=report-control-add-records-field-order#3895</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 1380<br /><strong>Posted:</strong> 08 November 2004 at 9:06am<br /><br />It doesn't matter how much the user move the columns or hides\removescolumns.&nbsp; You just need to make sure that you add the items in theexact same order that the columns were added (regardless of the currentcolumn arrangement).&nbsp; You need to also account for the columnsthat are not currently visible.&nbsp; So as long as you add items inthe same order that they you added the columns and add information forall of the item, you should never have any problems.]]>
   </description>
   <pubDate>Mon, 08 Nov 2004 09:06:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1380&amp;PID=3895&amp;title=report-control-add-records-field-order#3895</guid>
  </item> 
  <item>
   <title><![CDATA[Report c&#111;ntrol: add records &amp; field order : I am looking over the sample code...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1380&amp;PID=3885&amp;title=report-control-add-records-field-order#3885</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=570">nighthawk</a><br /><strong>Subject:</strong> 1380<br /><strong>Posted:</strong> 07 November 2004 at 1:01pm<br /><br />I am looking over the sample code for adding records to the reportcontrol.&nbsp; Adding the individual&nbsp; ReportRecordItem objects tothe row doesn't appear to be able to take into account a usercustomized column order.&nbsp; For example:<br><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Record.Add Item <font ="string">"RE: Your Invoice"</font><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Record.Add Item <font ="string">"John Smith"</font><font ="comment"></font><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Record.Add Item <font ="string">"19/06/2004"</font><font ="comment"></font><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Record.Add Item <font ="string">"18k"<br><br>This code adds the fields in the order it is executed in code but ifthe user switches the order of two of the colums, future records willnot be added correctly.&nbsp; Is there any way to add theReportRecordItem objects idependantly of the column order?&nbsp;Something like: "Record.AddItem (Value, ColumnID)" would be nice.</font>]]>
   </description>
   <pubDate>Sun, 07 Nov 2004 13:01:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1380&amp;PID=3885&amp;title=report-control-add-records-field-order#3885</guid>
  </item> 
 </channel>
</rss>