Print Page | Close Window

Invisible records

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=7031
Printed Date: 22 November 2024 at 8:11am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Invisible records
Posted By: Tex in a Can
Subject: Invisible records
Date 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.
 
Thanks. https://forum.codejock.com/uploads/20070502_174427_ReportSample2.zip - uploads/20070502_174427_ReportSample2.zip https://forum.codejock.com/uploads/20070502_174508_report_control_.zip - uploads/20070502_174508_report_control_.zip



Replies:
Posted By: adrien
Date Posted: 07 May 2007 at 8:37am
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.





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net