![]() |
CXTPReportControl group caption |
Post Reply
|
| Author | |
markr
Senior Member
Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTPReportControl group captionPosted: 06 March 2005 at 9:46am |
|
Can anyone provide me with a code example of how to create a custom CXTPReportControl group caption? I'm running XTP v9.51.
I've tried over-riding GetGroupCaption(CXTPReportColumn* pColumn) in my CXTPReportRecordItem subclass, but it never seems to fire. Any help would be greatly appreciated. - Mark R. |
|
![]() |
|
sserge
Moderator Group
Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 March 2005 at 2:27am |
|
Hi Mark,
Take a look at the sample application -- there are a number of working examples like following: class CMessageRecordItemXXX : public CXTPReportRecordItemYYY { ... virtual CString GetGroupCaption(CXTPReportColumn* pColumn); ... } There must be some another problem in your code if such overriding is not working... I'd probably say more about that if you list a piece of your code. -- Best regards, Sergey |
|
![]() |
|
markr
Senior Member
Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 March 2005 at 6:10pm |
|
Hi Sergey,
Thanks very much for your prompt reply. I must be overlooking something obvious. I'll post a quick code snippet here and risk public embarrasment. :-) Here's the class definition: class CDupReportRecordSize : public CXTPReportRecordItem { public: CDupReportRecordSize(__int64 nSize = 0); CString GetCaption(); CString GetGroupCaption(CXTPReportColumn* pColumn); protected: __int64 m_nSize; }; And the (relevant part of the) implementation: CString CDupReportRecordSize::GetGroupCaption(CXTPReportColumn* pColumn) { return "test"; } What's interesting is that the implementation for the GetCaption() override works fine - by which I mean that it actually fires. But the GetGroupCaption function never does (I can set a breakpoint and I get nothing). - Mark R. |
|
![]() |
|
sserge
Moderator Group
Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 March 2005 at 11:30am |
|
Mark,
It's strange -- your example actually works fine for me and returns test string when grouping by the associated column. Try adding grouping somewhere inside Report Control initializing: (like in the sample application) // Find your column associated with this Record Item CXTPReportColumn* pColSize = pReportCtrl->GetColumns()->Find(COLUMN_YOUR_SIZE);&nbs p; // Clear all other grouping pReportCtrl->GetColumns()->GetGroupsOrder()->Clear( ); // Group report control by the found column pReportCtrl->GetColumns()->GetGroupsOrder()->Add(pC olSize); -- Regards, Sergey |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 March 2005 at 9:09am |
|
markr, seems you have old version, check parameters of GetGroupCaption in source. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
markr
Senior Member
Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 March 2005 at 9:03pm |
|
Thanks to you both, I've got it working now.
Excellent product, and thanks for your prompt support. |
|
![]() |
|
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 |