![]()  | 
 
[SOLVED] v15.1.3.0908 SetFocusedRow(NULL) | 
 
    Post Reply  
   | 
  
| Author | |
   
   markr  
   
   Senior Member  
   Joined: 01 August 2004 Status: Offline Points: 443  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: [SOLVED] v15.1.3.0908 SetFocusedRow(NULL)Posted: 09 September 2011 at 8:24am  | 
 
| 
   
    
   
In the new v15.1.3.0908 release of the XTP report control, I get an immediate crash if I invoke: 
   
  GetReportCtrl().SetFocusedRow(NULL); Support for using NULL in this context was added to 15.1.1 to allow us to clear the currently focused row. The crash occurs because the method signature above calls EnsureVisbile(), which in turn doesn't always check to see if the row is NULL. This problem can be worked around by instead calling: GetReportCtrl().SetFocusedRow(FALSE, NULL, FALSE, FALSE); ... which bypasses the attempt to ensure row visibility (and thus avoids the crash). For long term solution, recommend that CodeJock change CXTPReportControl::EnsureVisible(CXTPReportRow *pRow) method so that it *always* checks for NULL row pointer. 
    | 
 |
![]()  | 
 |
   
   ABuenger  
   
   Newbie  
    
   Joined: 02 February 2006 Status: Offline Points: 1075  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 09 September 2011 at 11:20am | 
 
| 
   
    
   Thanks, fixed. 
   
   | 
 |
| 
   
     
     Codejock support
     
   
   | 
 |
![]()  | 
 |
   
   adrien  
   
   Senior Member  
   Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 21 September 2011 at 5:18am | 
 
| 
   
    
   I found this too, but it occured when I removed all records from a report.  So it's necessary to be able to call  CXTPReportSections::EnsureVisible(CDC *pDC, CXTPReportRow *pRow) with pRow = NULL. 
   
  e.g. XTPReportSections.cpp line 86 
 solves the problem for me  | 
 |
![]()  | 
 |
    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  |