Invisible records |
Post Reply |
Author | |
Tex in a Can
Newbie Joined: 02 May 2007 Location: United States Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 02 May 2007 at 5:45pm |
I have a combination of record items that will not display the data on the report control, see attached bitmap. The records appear to have been added (the sorts work and there are lines below the records) but the data is invisible. I modified the record sample with these record items and have attached the zipped project? Can anyone help? If I revert to the sample record items the data appears. I am totally confused.
|
|
adrien
Senior Member Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
Post Options
Thanks(0)
|
You need to insert each cell into the record.
your class CalGridRect doesn't call AddItem. Sample code for a reportRecord class SampleRecord : public CXTPReportRecord { public: SampleRecord(CString sData, double dData) { m_pText = new CXTPReportRecordItemText(); AddItem(m_pText); m_pNumber = new CXTPReportRecordItemNumber() AddItem(m_pNumber); m_pText->SetValue(sData); m_pNumber->SetValue(dData); } CXTPReportRecordItemText* m_pText; CXTPReportRecordItemNumber* m_pNumber; }; make sure you use pointer members and new them, otherwise when the framework deletes the pointers you pass in, you'll get heap corruption and a flaky app. It only seems to happen in release builds too, I guess due to differences in new and delete for debug vs release builds. |
|
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 |