Filter in parent records only doesn't work |
Post Reply |
Author | |
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
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 |