[SOLVED] Crash bug in 13.2 |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Posted: 24 October 2009 at 11:53am |
Unfortunately, SetLastColumnExpand is too buggy in its current state. 1) When there are no columns in a report control, the function crashes at XTPReportHeader.cpp(2044).
GetLastVisibleColumn() returns NULL:
m_pColumns->GetLastVisibleColumn()->SetAutoSize(TRUE);
2) When the control is resized, the report rows are not updated. It seems the GUI is never refreshed after this operation.
3) There is no descriptive comment for this function in the header file.
#2 is absolutely crucial, so I'll wait till next version :(
Tried your sample again, and got the same error as described:
It seems you don't handle scrolling properly...
|
|
PokerMemento - http://www.pokermemento.com/
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Try for now call this function after checking
if (GetReportCtrl().GetColumns()->GetLastVisibleColumn() != NULL) ....
I will put this check inside the code.
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Check new demo in your prev. post https://forum.codejock.com/forum_posts.asp?TID=15075 where I put a link to my new prototype with special last column mode - looks similar to your task
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
this is my code for ReportPaneView demo app - it properly do column sizing and use last column for external (form) resizing:
void CReportPaneViewView::OnInitialUpdate() {CXTPReportView::OnInitialUpdate(); CString columnStr; for (int i = 0; i < COL_NUMBER; i++) {columnStr.Format( "Column %d",i);CXTPReportColumn* pCol = GetReportCtrl().AddColumn( new CXTPReportColumn(i, columnStr, 60, FALSE,XTP_REPORT_NOICON,TRUE));pCol->EnableResize(TRUE); } for (int j = 0; j < ROW_NUMBER; j++) GetReportCtrl().AddRecord(new CReportViewRecord(j));GetReportCtrl().Populate(); GetReportCtrl().GetReportHeader()->SetAutoColumnSizing(FALSE); GetReportCtrl().GetPaintManager()->SetColumnStyle(xtpReportColumnOffice2007); GetReportCtrl().GetPaintManager()->SetDrawGridForEmptySpace(TRUE); GetReportCtrl().GetPaintManager()->SetGridStyle(0, xtpReportGridSolid); GetReportCtrl().GetPaintManager()->SetGridStyle(1, xtpReportGridSolid); GetReportCtrl().GetPaintManager()->SetHeaderRowsDividerStyle(xtpReportFixedRowsDividerBold); GetReportCtrl().GetPaintManager()->SetFooterRowsDividerStyle(xtpReportFixedRowsDividerBold); GetReportCtrl().GetPaintManager()->m_clrHeaderRowsDivider = RGB(255,0,0); GetReportCtrl().GetPaintManager()->m_clrFooterRowsDivider = RGB(0,0,255); GetReportCtrl().AssignIconViewPropNumAndIconNum(-1, -1, TRUE, 20); GetReportCtrl().GetPaintManager()->SetLastColumnWidthWYSIWYG(TRUE); GetReportCtrl().GetPaintManager()->SetColumnWidthWYSIWYG(TRUE); m_pPrintOptions->GetPageHeader()->m_strFormatString = "Header text: &p from &P";m_pPrintOptions->GetPageFooter()->m_strFormatString = "Footer text: &D";GetReportCtrl().m_bForcePagination = TRUE; GetReportCtrl().AllowEdit(TRUE); //GetReportCtrl().FocusSubItems(TRUE);GetReportCtrl().m_bSortedDragDrop = TRUE; GetReportCtrl().GetPaintManager()->SetHeaderRowsDividerStyle(xtpReportFixedRowsDividerBold); GetReportCtrl().GetPaintManager()->SetFooterRowsDividerStyle(xtpReportFixedRowsDividerBold); GetReportCtrl().GetPaintManager()->SetDrawGridForEmptySpace(TRUE); GetReportCtrl().GetPaintManager()->SetFreezeColsDividerStyle(xtpReportFreezeColsDividerThin | xtpReportFreezeColsDividerShowAlways); GetReportCtrl().GetColumns()->GetFirstVisibleColumn()->SetAutoSize(FALSE); GetReportCtrl().RedrawControl(); GetReportCtrl().GetReportHeader()->SetLastColumnExpand(TRUE, TRUE); } |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
See screenshot... |
|
PokerMemento - http://www.pokermemento.com/
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
This is not a sample I asked to look - check my way in CReportPaneViewView::OnInitialUpdate
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
What am I supposed to check? There is an obvious drawing problem when scrolling if this function has been called.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Was this fixed for 13.2.2+? |
|
PokerMemento - http://www.pokermemento.com/
|
|
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 |