![]() |
Records scan |
Post Reply ![]() |
Author | |
zaksoft ![]() Senior Member ![]() ![]() Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
![]() ![]() ![]() ![]() ![]() Posted: 30 September 2005 at 11:36am |
I need to scan all records in a report to export some data, I use this code:
CXTPReportRows* pRows = m_wndReport.GetRows(); ASSERT( pRows); ASSERT( m_nNumRows == pRows->GetCount()); for ( nRow = 1; nRow <= m_nNumRows; nRow++) { spread.SetRow( nRow); CXTPReportRow* pRow = pRows->GetAt( nRow - 1); ASSERT( pRow); // <<<<<<<<<<<<<< Error, see notes below if ( pRow == NULL) continue; CXTPReportRecord* pRecord = pRow->GetRecord(); ASSERT( pRecord); if ( pRecord) { .... code .... The problem is that this works as aspected when no gouping is performed, but when there is an active group I got as many assertion as the number of groups and the scan ends at Rec-Group item. Do You have an idea or a better solution then if ( pRow == NULL) { m_nNumRows++; continue; } TIA |
|
VS2022 - MFC MBCS Statically linked
XTP 23.1 Static Link --------------------------------------------------------- Davide Zaccanti - ZakSoft - www.zaksoft.com |
|
![]() |
|
zaksoft ![]() Senior Member ![]() ![]() Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
![]() ![]() ![]() ![]() ![]() |
I had to correct myself for a mistake in previous post: The unseen rows are cutted from the procedure that set the total number of row in the Excel spreadsheet... I've confused Rows number and Record number that of course have different values in case of grouping. I apologize for that. |
|
VS2022 - MFC MBCS Statically linked
XTP 23.1 Static Link --------------------------------------------------------- Davide Zaccanti - ZakSoft - www.zaksoft.com |
|
![]() |
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 |