HOWTO: Merge cells in footer rows? |
Post Reply |
Author | |
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
Posted: 07 March 2011 at 8:18am |
Hi;
I need merged cells in footer rows, but can't find out how. The first x cells of the footer row should be merged into one cell, so that a big text can fit into this cell (see Screenshot): How can I do that? |
|
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
larryp
Groupie Joined: 15 January 2005 Location: United States Status: Offline Points: 61 |
Post Options
Thanks(0)
|
You can try overriding the Draw method of CXTPReportRecordItem and changing pDrawArgs->rcItem.right before calling CXTPReportRecordItem::Draw( pDrawArgs ) int CMyItem::Draw(XTP_REPORTRECORDITEM_DRAWARGS* pDrawArgs) { // Change the rect to go all the way to the end of the row. pDrawArgs->rcItem.right = pDrawArgs->pRow->GetRect().right; // Handle condition where the calculated right is less than the left. if ( pDrawArgs->rcItem.right <= pDrawArgs->rcItem.left ) { pDrawArgs->rcItem.right = pDrawArgs->rcItem.left + 100000; } return CXTPReportRecordItem::Draw( pDrawArgs ); } Seems to work for me in version 13.2.1 |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
Thanks larryp; I'll try it.
|
|
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Hi,
the merge item feature has been rewritten for the next release. Merging header/footer items is now supported. wndReport.GetHeaderRecords()->MergeItems(CXTPReportRecordItemRange(...)); wndReport.GetFooterRecords()->MergeItems(CXTPReportRecordItemRange(...)); wndReport.GetRecords()->MergeItems(CXTPReportRecordItemRange(...)); Andre |
|
Codejock support
|
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
Hi;
Any news about the release date? Otherwise, is it possible to get the feature a little bit earlier? |
|
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Sorry, no release date yet.
|
|
Codejock support
|
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Open a new ticket to request the new code. Andre |
|
Codejock support
|
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
Hello Andre;
after a few days of testing I get an ACCVIO in new merge code in function void CXTPReportRow::Draw(CDC *pDC, CRect rcRow, CRect rcClip, int nLeftOffset, CXTPReportRecordMergeItems &mergeItems, BOOL bDrawFreeze) Line 505:
pItem is in this case NULL! This happens if I have more columns than items in the record (e.g. 3 columns but AddItem is called only twice). Could you fix this please? |
|
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
if (pItem && !pItem->IsMerged())
{ DrawItemGrid(pDC, pColumn, rcGridItem); } |
|
Codejock 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 |