Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Records scan
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Records scan

 Post Reply Post Reply
Author
Message
zaksoft View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2003
Location: Italy
Status: Offline
Points: 162
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaksoft Quote  Post ReplyReply Direct Link To This Post Topic: Records scan
    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

Back to Top
zaksoft View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2003
Location: Italy
Status: Offline
Points: 162
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaksoft Quote  Post ReplyReply Direct Link To This Post Posted: 30 September 2005 at 11:45am

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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.