Print Page | Close Window

sorting col. not sort CXTPReportControl Records

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=18605
Printed Date: 29 September 2024 at 1:22am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: sorting col. not sort CXTPReportControl Records
Posted By: Makarand
Subject: sorting col. not sort CXTPReportControl Records
Date Posted: 30 June 2011 at 5:38am
Hello CJ Team,

In the normal report control if we sort the column and then we try to get the value of specified row,col report control not returns sorted value it returns before sorting value.

To reproduce the issue just copy following code in Samplereport File (FormulaDlg.cpp). 

void CFormulaDlg::OnOK()
{
  
   CXTPReportRecord* pRecord=reinterpret_cast<CXTPReportRecord*>(m_wndReport.GetRecords()->GetAt(1));
   CString str = reinterpret_cast<CXTPReportRecordItemText*>(pRecord->GetItem(1))->GetValue();
   AfxMessageBox(str);
CDialog::OnOK();
}

Open "Formula Test" dialog. Dialog is already soreded/GroupsOrder on product. Above code get the value of 0 row and 0 col which is expected "Book" but actual we are getting "pen"

Why sorting col. not sort m_wndReport Records? 
How to sort records m_wndReport object?

-Mak




Replies:
Posted By: Makarand
Date Posted: 04 July 2011 at 7:33am
Go it... 

CXTPReportRecord* pRecord=  m_wndReport.GetRows()->GetAt(1)->GetRecord();
CString str = reinterpret_cast<CXTPReportRecordItemText*>(pRecord->GetItem(1))->GetValue();



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