<?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 : InsertAt: move or copy?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : InsertAt: move or copy?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 17:15:10 +0000</pubDate>
  <lastBuildDate>Thu, 08 Sep 2011 10:56:38 +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=18922</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[InsertAt: move or copy? : I am looking fora swap recordsfunction.FromCJ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18922&amp;PID=66216&amp;title=insertat-move-or-copy#66216</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 18922<br /><strong>Posted:</strong> 08 September 2011 at 10:56am<br /><br />I am looking for&nbsp;a swap records&nbsp;function.&nbsp;From&nbsp;CJ help: <DIV>&nbsp;</DIV><DIV><strong>InsertAt</strong> will move an existing ReportRecord to the specified index.</DIV><DIV>&nbsp;</DIV><DIV>So I wrote this code:</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>Private Sub Form_Load()<BR>&nbsp;&nbsp;&nbsp; With ReportControl1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Width = 8000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Height = 4000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Move 0, 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns.Add 0, "A", 100, True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns.Add 1, "B", 100, True</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .Records.Add<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "1.1"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "1.2"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .Records.Add<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "2.1"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "2.2"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .Records.Add<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "3.1"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "3.2"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Records.InsertAt 3, .Records(0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Populate<BR>&nbsp;&nbsp;&nbsp; End With<BR>End Sub<BR></DIV><DIV></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>The result is:</DIV><DIV>&nbsp;</DIV><DIV><img src="http://forum.codejock.com/uploads/2720/InsertAt.jpg" height="177" width="549" border="0" /></DIV><DIV>&nbsp;</DIV><DIV>The&nbsp;first record is copied to&nbsp;a new 4th record.&nbsp;This is a <strong>copy,</strong> not a <strong>move</strong>. Someone can please confirm it?</DIV><DIV>&nbsp;</DIV><DIV>The best strategy to swap two records by code is <strong>InsertAt/RemoveAt</strong>?&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 08 Sep 2011 10:56:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18922&amp;PID=66216&amp;title=insertat-move-or-copy#66216</guid>
  </item> 
 </channel>
</rss>