Print Page | Close Window

Records scan

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=2980
Printed Date: 23 November 2024 at 9:10pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Records scan
Posted By: zaksoft
Subject: Records scan
Date 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




Replies:
Posted By: zaksoft
Date 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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net