Print Page | Close Window

Bug fix to report’s tree drawing

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1491
Printed Date: 07 November 2025 at 1:42am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Bug fix to report’s tree drawing
Posted By: Torlack
Subject: Bug fix to report’s tree drawing
Date Posted: 03 December 2004 at 12:28pm
Given the following tree layout, the tree structure fails to draw correctly in the report.

1
x2
xx3
xxx4
xxx5
x6

The DrawTreeStructure routine is broken and would not draw the line between 2 and 6 in the rows containing 4 and 5.

Here is the fix, to just the while loop.

pRow = pRow->GetParentRow();

if (pRow == NULL || pRow->GetParentRow() == 0 || pRow->IsGroupRow())
{
    break;
}

rcItem.OffsetRect(-nTreeIndent, 0);
if (!pRow->IsLastTreeRow())
{
    pDC->FillSolidRect(rcItem.left, rcItem.top - 1, 1, rcItem.Height() + 1, clrTreeStructure);
}

The "IsLastTreeRow" was causing it to abort early.  In my simple (and maybe wrong) fix, I only used it to test to see if we draw the line.




Replies:
Posted By: Oleg
Date Posted: 06 December 2004 at 7:44am

Sorry for our bad testing, you are rigtht. We fixed it as you suggest.

 

Thank you for your help!



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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