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

A question about Records Deleting In Report

 Post Reply Post Reply
Author
Message
linyilong View Drop Down
Newbie
Newbie


Joined: 17 October 2016
Location: China
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote linyilong Quote  Post ReplyReply Direct Link To This Post Topic: A question about Records Deleting In Report
    Posted: 17 October 2016 at 11:42pm
I have three ways to clear records in report :

CXTPReportControl m_report;

1 . m_report.GetRecords()->RemoveAll(); //but it can't release space

2.m_report.ResetContent();

3.
int RowNumAll = m_report.GetRecords()->GetCount();
// 
if (RowNumAll>0)
{
for (int i = 0;i<RowNumAll;++i)
{
CXTPReportRecord *pRecord = m_report.GetRecords()->GetAt(0);

if (!pRecord)
{
return false;
}

m_report.RemoveRecordEx(pRecord);
}
}

When the report comtrol contains a mass of records, it will be quite slow to clear the report by the ways above, for example , I have create a report containning three million records ,and the time spent to clear shis report is up to 20mimutes.. who konws the best to figure out this problem?
MY Computer config: 
(Processor: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz,   Memory: 8192MB RAM)
I am whatever
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 26 October 2016 at 6:15am
Hello,

For millions records we advise to use virtual mode in ReportControl.

Regards,
 Oleksandr Lebed
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.137 seconds.