<?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 : move to last row at form_load</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : move to last row at form_load]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 08:11:39 +0000</pubDate>
  <lastBuildDate>Wed, 17 Sep 2008 14:04:23 +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=12149</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[move to last row at form_load : Hi,  I found: when having a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12149&amp;PID=41110&amp;title=move-to-last-row-at-form-load#41110</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 12149<br /><strong>Posted:</strong> 17 September 2008 at 2:04pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>I found: <strong>when having a VB menu</strong> the RC selects last row but doesn't scroll to last row. I added DoEvents after populating RC and now the RC scrolls to last row as should. </DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>wndReportControl.Populate</DIV><DIV>DoEvents</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><DIV>You can use one of the following lines:</DIV></DIV><OL><LI>wndReportControl.Navigator.MoveToRow wndReportControl.Rows.Count - 1, False, False</LI><LI><strong>wndReportControl.Navigator.MoveLastRow False, False</strong></LI><LI>wndReportControl.Rows(wndReportControl.Rows.Count - 1).Selected = True</LI><LI>wndReportControl.FocusedRow = wndReportControl.Rows(wndReportControl.Rows.Count - 1)<BR></LI></OL><DIV>No 2 is best way, this is by design <img src="http://forum.codejock.com/smileys/smiley4.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 17 Sep 2008 14:04:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12149&amp;PID=41110&amp;title=move-to-last-row-at-form-load#41110</guid>
  </item> 
  <item>
   <title><![CDATA[move to last row at form_load : You can use:   Set MyReport.FocusedRow...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12149&amp;PID=41080&amp;title=move-to-last-row-at-form-load#41080</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2531">Baldur</a><br /><strong>Subject:</strong> 12149<br /><strong>Posted:</strong> 17 September 2008 at 3:04am<br /><br />You can use: <DIV>&nbsp;</DIV><DIV>Set MyReport.FocusedRow = MyReport.Rows(MyIndex)</DIV><DIV>&nbsp;</DIV><DIV>This works as EnsureVisible in other controls.</DIV><DIV>&nbsp;</DIV><DIV>Because you can have multiple selected rows, which should by focused ?</DIV>]]>
   </description>
   <pubDate>Wed, 17 Sep 2008 03:04:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12149&amp;PID=41080&amp;title=move-to-last-row-at-form-load#41080</guid>
  </item> 
  <item>
   <title><![CDATA[move to last row at form_load : Hi,   You can use:   wndRe...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12149&amp;PID=41057&amp;title=move-to-last-row-at-form-load#41057</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 12149<br /><strong>Posted:</strong> 16 September 2008 at 1:01pm<br /><br />Hi, <DIV>&nbsp;</DIV><DIV>You can use: </DIV><OL><LI>wndReportControl.Navigator.MoveToRow wndReportControl.Rows.Count, False, False <LI>wndReportControl.Navigator.MoveLastRow False, False <LI>wndReportControlFiles.Rows(wndReportControlFiles.Rows.Count - 1).Selected = True</LI></OL><DIV>But it seems that selecting the last row doesn't work as should. It selects the row but doesn't scroll to the last row. I have commandbars in form and when I float the CB the last row will be visible.</DIV><DIV>&nbsp;</DIV><DIV>Try to set one of these methods at the end of form load and you will see that it works, also have the form maximized will work as should. I will add this "problem" to my major issue post and CJ will have a fix in next release.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 16 Sep 2008 13:01:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12149&amp;PID=41057&amp;title=move-to-last-row-at-form-load#41057</guid>
  </item> 
  <item>
   <title><![CDATA[move to last row at form_load : Dear All,  I am trying to move...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12149&amp;PID=40985&amp;title=move-to-last-row-at-form-load#40985</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1380">winanjaya</a><br /><strong>Subject:</strong> 12149<br /><strong>Posted:</strong> 14 September 2008 at 11:17am<br /><br />Dear All,<DIV>&nbsp;</DIV><DIV>I am trying to move to last row at form load .. but it doesnot work.. what I missed? I need advise</DIV><DIV>&nbsp;</DIV><DIV>Thanks &amp; Regards</DIV><DIV>Winanjaya</DIV><DIV>&nbsp;</DIV><DIV>Private Sub Form_Load()<BR>CreateReportControl<BR>End Sub</DIV><DIV><BR>Private Sub CreateReportControl()<BR>&nbsp;&nbsp;&nbsp; 'Start adding columns<BR>&nbsp;&nbsp;&nbsp; Dim Column As ReportColumn<BR>&nbsp;&nbsp;&nbsp; Set Column = wndReportControl.Columns.Add(COLUMN_SENT1, "Sent Date", 50, True)<BR>&nbsp;&nbsp;&nbsp; Set Column = wndReportControl.Columns.Add(COLUMN_SENT2, "Sent Time", 50, True)<BR>&nbsp;&nbsp;&nbsp; Set Column = wndReportControl.Columns.Add(COLUMN_FROM, "From", 180, True)<BR>&nbsp;&nbsp;&nbsp; Set Column = wndReportControl.Columns.Add(COLUMN_TO, "To", 180, True)<BR>&nbsp;&nbsp;&nbsp; Set Column = wndReportControl.Columns.Add(COLUMN_MSG, "Msg", 180, False)</DIV><DIV>&nbsp;&nbsp;&nbsp; wndReportControl.PaintManager.MaxPreviewLines = 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; PopulateSentItems<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; wndReportControl.GroupsOrder.Add wndReportControl.Columns(0)<BR>&nbsp;&nbsp;&nbsp; wndReportControl.GroupsOrder(0).SortAscending = True<BR>&nbsp;&nbsp;&nbsp; wndReportControl.Columns(4).Visible = False<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set fntStrike = wndReportControl.PaintManager.TextFont<BR>&nbsp;&nbsp;&nbsp; fntStrike.Strikethrough = True<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set fntBold = wndReportControl.PaintManager.TextFont<BR>&nbsp;&nbsp;&nbsp; fntBold.Bold = True<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; wndReportControl.Populate<BR>&nbsp;&nbsp;&nbsp; wndReportControl.SetCustomDraw xtpCustomBeforeDrawRow</DIV><DIV>&nbsp;&nbsp;&nbsp; wndReportControl.Rows.Row(wndReportControl.Rows.Count - 1).Selected = True</DIV><DIV>End Sub</DIV><DIV>&nbsp;</DIV><DIV>Private Sub PopulateSentItems()<BR>Dim rsSentItems As New ADODB.Recordset<BR>Dim mSQL As String<BR>Dim mFrom As String, mTo As String, mUDate As String, mUTime As String, mMsg As String<BR>mSQL = "SELECT * FROM SMS WHERE STAT = '" &amp; STAT &amp; "' ORDER BY UDATE,UTIME"<BR>rsSentItems.Open mSQL, cnData, adOpenForwardOnly, adLockReadOnly<BR>If Not rsSentItems.EOF Then<BR>&nbsp;&nbsp;&nbsp; Do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mFrom = rsSentItems!SENDER<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mTo = rsSentItems!dest<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mUDate = Format(rsSentItems!UDATE, "dd-mmm-yyyy")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mUTime = Format(rsSentItems!UTIME, "hh:nn")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mMsg = rsSentItems!MSG<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AddRecord mFrom, mTo, mUDate, mUTime, mMsg<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rsSentItems.MoveNext<BR>&nbsp;&nbsp;&nbsp; Loop Until rsSentItems.EOF<BR>End If<BR>errhand:<BR>rsSentItems.Close<BR>End Sub</DIV><DIV>&nbsp;</DIV><DIV>Public Sub AddRecord(ByVal pFrom As String, ByVal pTo As String, ByVal pUDate, ByVal pUTime As String, ByVal pPreview As String)<BR>Dim Record As ReportRecord<BR>Set Record = wndReportControl.Records.Add()<BR>Dim Item As ReportRecordItem<BR>Set Item = Record.AddItem("")<BR>Record.AddItem pUDate<BR>Record.AddItem pUTime<BR>Record.AddItem pFrom<BR>Record.AddItem pTo<BR>Record.AddItem pPreview<BR>Record.PreviewText = pPreview<BR>End Sub</DIV><DIV>&nbsp;</DIV><DIV>Private Sub wndReportControl_SelectionChanged()<BR>&nbsp;&nbsp;&nbsp; If Not wndReportControl.FocusedRow.GroupRow Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rtfText.Text = wndReportControl.FocusedRow.Record.PreviewText<BR>&nbsp;&nbsp;&nbsp; End If<BR>End Sub</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 14 Sep 2008 11:17:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12149&amp;PID=40985&amp;title=move-to-last-row-at-form-load#40985</guid>
  </item> 
 </channel>
</rss>