Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - sorting col. not sort CXTPReportControl Records
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

sorting col. not sort CXTPReportControl Records

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

Joined: 27 February 2007
Location: India
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote Makarand Quote  Post ReplyReply Direct Link To This Post Topic: sorting col. not sort CXTPReportControl Records
    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

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

Joined: 27 February 2007
Location: India
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote Makarand Quote  Post ReplyReply Direct Link To This Post 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();
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.173 seconds.