http://forum.codejock.com/uploads/20090706_063301_ReportQuestion.rar - uploads/20090706_063301_ReportQuestion.rar
Hello, we have a problem with the simple implementation of a Report Control inside a View. With simple implementation I mean the use of text columns, not the complex record types used inside Codejock´s examples (CMessageRecord).
We need to insert a ReportControl inside a view. As another controls must be inserted in it, the CXTPRecordView is not a solution for us. We start using the ReportControl as a member variable of our view (the simple standard view of a SDI application). Inside OnCreate function we create the window for the control and after, we create one simple column and just one single record with a CXTPReportRecordItemText in it (just to test). After we call Populate function inside OnInitialUpdate. All this seems simple enough to work fine but, unfortunately, we don´t get a correct behaviour. The control is created, the column is created too with its caption, even a record is created (as a white marked rectangle is shown), but there is no text for the record. It seems to be empty.
We took a look inside Codejock´s examples. First of all, except for the VirtualList one, they all use complex types of records that only make everything more obscure. We decided to change VirtualList example. We set it with just one column and commented the line where the virtual mode is created. Instead, we use the same lines of code we implemented before in our project and... it worked.
I don´t know the reason why with apparently the same lines of active code the behaviour is different. If someone wants to help us, you´ll find on the top of this page a link to a jpg image showing these elements. If we don´t find a solution for this question we should consider the use of another control different from those of Codejock.
Thanks in advance.
|