![]()  | 
 
SOLVED:Get RowNumber | 
 
    Post Reply  
   | 
  
| Author | |
   
   JamGodz  
   
   Groupie  
   Joined: 25 February 2010 Status: Offline Points: 67  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: SOLVED:Get RowNumberPosted: 21 September 2010 at 2:20am  | 
 
| 
   
    
   
Hi! 
   
  Just wanna know on how to get the rownumber of the created row number column.. for example i have declared the .CreateRowNumberColumn then in BeforeDrawRow i want to get the rownumber value of created row number. Thank you!  | 
 |
![]()  | 
 |
   
   Aaron  
   
   Senior Member  
   Joined: 29 January 2008 Status: Offline Points: 2192  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 September 2010 at 3:18am | 
 
| 
   
    
   Hi,
 
   
  You aren't able to retrieve the numbers of that column but you are able to get index with Row.Record.Index to get rownumber. Actually is same index (CreateRowNumberColumn) as you added records to RC. 
 | 
 |
| 
   
     
     Product: Xtreme SuitePro (ActiveX) version 15.0.2 
 
   
  Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option....  | 
 |
![]()  | 
 |
   
   JamGodz  
   
   Groupie  
   Joined: 25 February 2010 Status: Offline Points: 67  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 September 2010 at 3:27am | 
 
| 
   
    
   hi Aaron.. thank for your reply.. 
   
  i have tried the Debug.Print Row.Record.Index in BeforeDrawRow event... but ive got error: object variable or with block variable not set. thank you.... please i really need help on this..  | 
 |
![]()  | 
 |
   
   Aaron  
   
   Senior Member  
   Joined: 29 January 2008 Status: Offline Points: 2192  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 September 2010 at 4:03am | 
 
| 
   
    
   Hi,
 
   
  Are you using ReportControl Virtualmode? 
As I said in another post, upload small demo and add some info for the things you want to accomplish and I will see what I can do  
 | 
 |
| 
   
     
     Product: Xtreme SuitePro (ActiveX) version 15.0.2 
 
   
  Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option....  | 
 |
![]()  | 
 |
   
   JamGodz  
   
   Groupie  
   Joined: 25 February 2010 Status: Offline Points: 67  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 September 2010 at 8:31am | 
 
| 
   
    
   Hi Aaron' Thank you so much... ive figured out the problem.... below are
 my solution... please advice if im mistaken something... i put a 
condition if Not Row.Group coz i added a grouporder. 
   
  If Not Row.GroupRow Then If Row.Record.Index < rs.RecordCount Then rs.AbsolutePosition = Row.Record.Index + 1: rs.Move 0 Row.Record(COLUMN_ICON_STATUS).Tag = rs.Fields![POSTED] With Row.Record(COLUMN_ICON_STATUS) Select Case .Tag Case "P" .Icon = RECORD_BLUE_ICON .ToolTip = "Posted" Row.Record(COLUMN_KMDIST).Editable = False Case "R" .Icon = RECORD_RED_ICON .ToolTip = "REMARKS:" & vbCrLf & rs.Fields![REMARKS] Case Else: .Icon = RECORD_GREEN_ICON End Select End With End If End If thank you!  | 
 |
![]()  | 
 |
   
   JamGodz  
   
   Groupie  
   Joined: 25 February 2010 Status: Offline Points: 67  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 September 2010 at 8:34am | 
 
| 
   
    
   btw, how can is  tag this topic as resolved? 
   
  tnx  | 
 |
![]()  | 
 |
   
   Aaron  
   
   Senior Member  
   Joined: 29 January 2008 Status: Offline Points: 2192  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 September 2010 at 9:29am | 
 
| 
   
    
   Hi,
 
   
  I didn't know you use BeforeDrawRow event to load data from recordset. If I look at your code (because I said you are able to retrieve index of row with Row.Record.Index but in Virtualmode you have only ONE record) you are using Row.Record.Index and that is wrong. Row.Record.Index will always return 0 (in your case 1, because of Row.Record.Index + 1)  
If Not Row.GroupRow Then 
If Row.Record.Index < rs.RecordCount Then rs.AbsolutePosition = Row. Just remove .record and it's OK 
btw line: If Not Row.GroupRow Then is a good thing to do in BeforeDrawRow event  
 | 
 |
| 
   
     
     Product: Xtreme SuitePro (ActiveX) version 15.0.2 
 
   
  Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option....  | 
 |
![]()  | 
 |
   
   JamGodz  
   
   Groupie  
   Joined: 25 February 2010 Status: Offline Points: 67  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 September 2010 at 10:11am | 
 
| 
   
    
   thank you so much Aaron.. its solved my problem!
    
   
   | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |