Print Page | Close Window

[SOLVED] Crash bug in 13.2

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=15444
Printed Date: 08 May 2024 at 4:06am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Crash bug in 13.2
Posted By: znakeeye
Subject: [SOLVED] Crash bug in 13.2
Date 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/



Replies:
Posted By: mdoubson
Date Posted: 26 October 2009 at 6:32pm
Try for now call this function after checking
if (GetReportCtrl().GetColumns()->GetLastVisibleColumn() != NULL) ....
I will put this check inside the code.


-------------
Mark Doubson, Ph.D.


Posted By: mdoubson
Date Posted: 26 October 2009 at 6:48pm
Check new demo in your prev. post https://forum.codejock.com/forum_posts.asp?TID=15075 - 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

-------------
Mark Doubson, Ph.D.


Posted By: mdoubson
Date Posted: 26 October 2009 at 7:52pm
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);

}



-------------
Mark Doubson, Ph.D.


Posted By: znakeeye
Date Posted: 27 October 2009 at 11:27am

See screenshot...



-------------
PokerMemento - http://www.pokermemento.com/


Posted By: mdoubson
Date Posted: 27 October 2009 at 11:30am
This is not a sample I asked to look - check my way in CReportPaneViewView::OnInitialUpdate

-------------
Mark Doubson, Ph.D.


Posted By: znakeeye
Date Posted: 29 October 2009 at 6:54am
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/


Posted By: znakeeye
Date Posted: 01 February 2010 at 8:02am

Was this fixed for 13.2.2+?



-------------
PokerMemento - http://www.pokermemento.com/



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