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

ReleaseItem error

 Post Reply Post Reply
Author
Message
yayo View Drop Down
Groupie
Groupie
Avatar

Joined: 22 December 2006
Location: Korea, South
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote yayo Quote  Post ReplyReply Direct Link To This Post Topic: ReleaseItem error
    Posted: 03 February 2009 at 12:38am
prev code:
 
void CXTPReportControl::ReleaseItem(int nIndex)
{
    int i;

   for (i = 0; i < m_pRecords->GetCount(); i++)
   {
       CXTPReportRecord* pRecord = m_pRecords->GetAt(i);
       pRecord->m_arrItems[nIndex]->InternalRelease();
       pRecord->m_arrItems.RemoveAt(nIndex);
   }

 modified code :

void CXTPReportControl::ReleaseItem(int nIndex)
{
    int i;
    for (i = 0; i < m_pRecords->GetCount(); i++)
    {
       CXTPReportRecord* pRecord = m_pRecords->GetAt(i);
       //yayo
       pRecord->ReleaseItem(nIndex);
       //pRecord->m_arrItems[nIndex]->InternalRelease();
       //pRecord->m_arrItems.RemoveAt(nIndex);
    }
 
add code :
 
XTPReportRecord.h
void ReleaseItem(int nIndex);
 
XTPReportRecord.cpp
// yayo
void CXTPReportRecord::ReleaseItem(int nIndex)
{
 for(int j=0; j<GetChilds()->GetCount(); j++)
 {
  CXTPReportRecord* pChildRecord = GetChilds()->GetAt(j);
  pChildRecord->ReleaseItem(nIndex);
 }
 m_arrItems[nIndex]->InternalRelease();
 m_arrItems.RemoveAt(nIndex);
}
 
 
 
hi
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.109 seconds.