![]() |
Report Control |
Post Reply
|
| Author | |
almatesic
Newbie
Joined: 25 November 2005 Location: United States Status: Offline Points: 22 |
Post Options
Thanks(0)
Quote Reply
Topic: Report ControlPosted: 28 December 2005 at 9:13am |
|
I am trying to add my own data to the columns I have created. I am using the following snippet // add new record to the record list CXTPReportRecords* pList = new CXTPReportRecords();pList->Add( new CXTPReportRecord(0, _T("Albino"), NULL, NULL, NULL, _T("NJ"), _T("07650")));and it is telling me that CXTPReportRecord does not support 7 arguments. Don't know what I am doing wrong here. Below is the code where I added the above lines. int CContactViewList::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CXTPReportView::OnCreate(lpCreateStruct) == -1) return -1; CXTPReportControl& wndReport = GetReportCtrl(); wndReport.GetReportHeader()->AllowColumnRemove(FALSE); wndReport.AddColumn(new CXTPReportColumn(0, _T("Name"), 25)); wndReport.AddColumn(new CXTPReportColumn(1, _T("Phone"), 10)); wndReport.AddColumn(new CXTPReportColumn(2, _T("Company"), 25)); wndReport.AddColumn(new CXTPReportColumn(3, _T("Adress"), 15)); wndReport.AddColumn(new CXTPReportColumn(4, _T("City"), 5)); wndReport.AddColumn(new CXTPReportColumn(5, _T("State"), 5)); wndReport.AddColumn(new CXTPReportColumn(6, _T("Zip"), 8)); // add new record to the record list CXTPReportRecords* pList = new CXTPReportRecords();pList->Add( new CXTPReportRecord(0, _T("Albino"), NULL, NULL, NULL, _T("NJ"), _T("07650")));wndReport.SetVirtualMode( new CVirtualRecord(), 50);wndReport.Populate(); return 0;} Thanks a million! |
|
![]() |
|
SuperMario
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 December 2005 at 1:33pm |
|
That is beacuse CXPTReportRecords::Add does not accept 7 arguments:
CXTPReportRecord* Add(CXTPReportRecord* pRecord) You need: pList->Add(new CXTPReportRecord()); I suggest looking over the Virtal List sample more closely. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |