Print Page | Close Window

GroupRow collasped

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=6339
Printed Date: 20 May 2024 at 6:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: GroupRow collasped
Posted By: amenis
Subject: GroupRow collasped
Date Posted: 07 February 2007 at 5:15am
Hello from france,

I would like collapse the groupRow tree, but keep expanded branchs where I have tagged records.
I have done many tests and  many Times my reportControl crash.

thank you for your help



Replies:
Posted By: sserge
Date Posted: 07 February 2007 at 5:47am
Hi,

Could you please attach any of your test applications there?

--
WBR,
Serge


Posted By: amenis
Date Posted: 21 February 2007 at 4:32am
Well, I'm be back 

I have plugged the follow procedure in a sample project, and these work perfectly.
In the original project (which is more weighty), my tree is collapsed too, but ...
when i want expand branch , it's not the branch where I click on which has been expanded. The ReportControl_RowExpanded return me the good groupCaption.

Any idea ?

here my procedures (two way) :

Private Sub collapseAsc(index As Integer)
    Dim row As ReportRow
    Dim lCpt As Long
   
    For lCpt = ReportControl(index).Rows.Count - 1 To 0 Step -1
        Set row = ReportControl(index).Rows(lCpt)
        If row.GroupRow Then
            If haveRecordChildTagged(row) Then
                row.Expanded = True
            Else
                row.Expanded = False
            End If
        End If
    Next
   
End Sub

Private Sub collapseDesc(index As Integer)
    Dim row As ReportRow
   
    For Each row In ReportControl(index).Rows
        If row.GroupRow Then
            If haveRecordChildTagged(row) Then
                row.Expanded = True
            Else
                row.Expanded = False
            End If
        End If
    Next
   
End Sub


Posted By: amenis
Date Posted: 21 February 2007 at 8:55am
a snapshot of my (your ? ) probleme




Posted By: amenis
Date Posted: 21 February 2007 at 11:26am
more  , and more investigations ...

The problem occure when :
1) I insert a new record in reportControl.records
2) run reportControl.populate
3) run collapseDesc

If i do sort and in sort event i put :

Private Sub ReportControl_SortOrderChanged(Index As Integer)
    collapseDesc Index
End Sub

ReportControl is ok , the problem reported disappear.






Posted By: amenis
Date Posted: 21 February 2007 at 11:43am
Arf i use collapseAsc instead collapseDesc. collapseDesc doesn't work.


Posted By: amenis
Date Posted: 22 February 2007 at 4:07am
I find the error

I have deleted  a reportControl.redraw , and things work ok.


Posted By: sserge
Date Posted: 22 February 2007 at 3:21pm
Fine!

--
WBR,
Serge



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