Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Filter in parent records only doesn't work
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Filter in parent records only doesn't work

 Post Reply Post Reply
Author
Message
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Topic: Filter in parent records only doesn't work
    Posted: 10 June 2010 at 7:31am
Hi
 
I have an RC with some records. Attached to these records are 0, 1, 2... child records. What I try to figure out: how can I use .FilterText searching only in parent records (ignoring all childs). I tried RC.RecordTreeFilterMode = xtpReportFilterTreeSimple. But that doesn't work. FilterText was applied also to child records.
 
Does anybody have an idea how to accomplish that behavior without searching through all record items myself???
 
Thanks in advance
Fabian
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2010 at 10:53am
Hi Fabian,
 
Maybe wndReportControl.SortRecordChildren = False will help
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2010 at 11:14am
Hi Aaron,
 
Thanks for looking at this, but that doesn't help  child records not containing filtertext wouldn't be shown
 
 
Fabian
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2010 at 3:00pm
Hi Fabian,
 
Of course that doesn't help, SortRecordChildren property is for sorting  
 
But you are right about Filter only Parents... Well, it works as should but it's a pity that Record children aren't visible anymore. Would be nice if CJ would implement this as well  
 
For now you have to do this yourself but I will add this to the list and maybe, just maybe CJ will implement this.
 
Good luck
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2010 at 1:57am
Hi Aaron,
 
But thats only true if FilterText was not found in the appropriate child record. If FilterText exists in both, parent and child, the child record was shown. I expected, that child record are always shown in this mode where child records are excluded from the search process.
 
Will submit it as an issue...
 
Thanks again
Fabian
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2010 at 6:26am
Hi Fabian,
 
I added this to my list as well  I though after applying filter it would be easy to make child records visible again but it seems I can't because filter is still applied  But if you are desperate you could use following code instead and will hide only parent records which don't match textToSearch string
 
Private Function FilterReportItems(columnToSearch As Integer, textToSearch As String)
    Dim xtremeRecord As XtremeReportControl.ReportRecord
   
    With Me.wndReportControl
        For Each xtremeRecord In .Records
            xtremeRecord.Visible = True 
            If xtremeRecord.Childs.Count > 0 Then
                If Not UCase(xtremeRecord(columnToSearch).Caption) Like "*" & UCase(textToSearch) & "*" Then
                    xtremeRecord.Visible = False
                End If
            End If
        Next xtremeRecord
       
        .Populate
    End With
 
End Function
 
 
Would be better to have more Filter functionality in ReportControl (already added to my list as well )
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2010 at 6:35am
Hi Aaron,
 
Thanks for your effort. My idea was to add a hidden column and fill its items only for child records with the content of the search field. So each child record will satisfy the filter criteria. Because I filter in each change event of the filter textbox thats too slow.
 
I have some hopes for CJ fixing this.
 
Regards Fabian
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2010 at 6:45am
Hi Fabian,
 
Depends on the amount of records you have but with above code I tried with 25000 records (with each 3 child items) it takes about 4 seconds to filter on one item (I have to say I have a very "slow" laptop - 800MHz) I will try this at the office and see what results I get.
 
But you are right, would be better if CJ added this option
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2010 at 8:12am
Hi,
 
Just in case someone wants to have a go with it
 
 
 
Just type some characters in TextBox and see result. I mentioned 4 seconds but depends on the amount of records and the search string of course (every typed char will iterate record collection so the more characters you type the longer it takes...) 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.