RC Search Highlight Demo w/ Metrics.Text |
Post Reply |
Author | |||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
Posted: 22 December 2010 at 9:25pm |
||
I'm publishing this demo because I think it could be useful for others, however there are some apparent bugs in the RC that are preventing it from being perfectly useful at this point.
My hope is that the bugs will get fixed, and I can drop the [BUG] tag and replace it with [DEMO]. DEMO PURPOSE: To show the benefits of using ReportRecordItem.Value, ReportRecordItem.Caption and Metrics.Text in the BeforeDrawRow event of the ReportControl. The techniques used here will allow us to have a "smart" sort for columns, editable plain text, and fancy markup for dynamic display purposes. CURRENT PROBLEMS: 1) Metrics.Text values are interfering with Tooltips (Oleg has said this should be fixed for V15) 2) Metrics.Text values are interfering with inplace edit window text. SCREENSHOT: DOWNLOAD: uploads/2676/RcMetricsBugs.zip |
|||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|||
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
||
Just found this today as I was looking for a method to filter/search rows within a ReportControl with a TreeColumn.
The way in which I am using it is to display data only! So there's no editing involved within the grid, however I can confirm that this seems to work ok in v15.1.1 when in edit mode. However if there is text in a column that is wider, normally an ellipsis appears and a tooltip is available, that disappears. But despite this I have found this to be a useful addition to the ReportControl, with a little tweak to display numeric values as right aligned. |
|||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|||
Willowmaster
Senior Member Joined: 12 July 2010 Location: Netherlands Status: Offline Points: 180 |
Post Options
Thanks(0)
|
||
That looks really neat! We have a search in searchresults field. This would be a nice way the highlight te keyword.
|
|||
Product: Xtreme SuitePro (ActiveX) version 15.3.1
Platform: Windows XP (32bit) - SP 3 (on VMWare) Language: Visual Basic 6.0 |
|||
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
||
Yeah that's what I thought when I found this, so I added the Highlight as an option (defaulted of course).
|
|||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
||
You can get the ellipsis by changing the Metrics.Text line in the BeforeDrawRow event to:
or
For some reason, I can't get the tooltips to show even if I set the Markup ToolTip attribute though :( Maybe a bug? |
|||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|||
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
||
Hi jpbro,
Thanks for the code sample on how to resolve the ellipsis issue I was having. I went for the CharacterEllipsis method as it keeps it inline with the way the ReportControl works. Yeah I tried the Markup ToolTip also but couldn't get anything to show either. Possibly a bug, or just not supported by CJ it's anyones guess! |
|||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
||
Glad to help - sorry my post got a little mangled (fixed).
|
|||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|||
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
||
Hi,
I have Tooltips in ReportControl with MarkUp... Or is it with new version?
|
|||
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.... |
|||
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
||
Hi Aaron,
Yeah I am using v15.1.1 and the ToolTip does not appear to display for either the Span or TextBlock within the ReportControl. Can you post a sample of how you done this so I can at least clarify if this is another bug with v15.1.1? |
|||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|||
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
||
Hi,
With RC
.EnableMarkup = True With .Records.Add With .AddItem("1") .Caption = "<TextBlock ToolTip='abcd'>abc</TextBlock>" End With Produces this:
|
|||
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.... |
|||
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
||
Thanks Aaron,
From your snippet of code I successfully managed to tweak the code to get the ToolTip property working with jpbro's Highlight code. I updated the code in the BeforeDrawRow event:
This works fine for my needs, however when I tested this in jpbro's original demo I get the code to crash when in edit mode. But as I am not using the ReportControl in edit mode that's ok by me |
|||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|||
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
||
Hi Alexander,
I tried your code with V15.0.2 and it works OK, at least no crash.
|
|||
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.... |
|||
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
||
Hi Aaron,
The crash only happened as I had changed the line:
I have updated my previous post above with this fix. |
|||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|||
JamGodz
Groupie Joined: 25 February 2010 Status: Offline Points: 67 |
Post Options
Thanks(0)
|
||
Hi Sir Xander! Good Day!
Just want to know of how you do it, the filter function... can you teach/post some sample code? i saw your screenshot and that's all i need especially those above the reportcontrol... please... Thank you. |
|||
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
||
Hi JamGodz,
Well as for the code you can get this from jpbro's first post and change the code accordinly as per my fifth post. As for the filter, well it's nothing more than a FlatEdit & PushButton control. I changed the way in which the filter worked by disabling and enabling a timer each time the filter was changed so as that it meant it would only filter after a few seconds of inactivity.
As for the checkbox "Highlight Filtered Text", I added this later on and this can be added in the BeforeDrawRow event, simlpy replace the block of code in post five:
with the following code:
|
|||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|||
JamGodz
Groupie Joined: 25 February 2010 Status: Offline Points: 67 |
Post Options
Thanks(0)
|
||
Hi Xander! thank you for the reply and specially the code..
but i have found an error in l_Text = EncodePlainTextForXaml(Item.Value) its says "Object Variable or With block variable not set" i have a 2 grouprow in my RC. how can avoid this error? and it doesnt hightlight the grouprow. thanks? |
|||
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
||
Hi JamGodz,
I guess this issue is occuring due to the use of the GroupRow. I didn't test for that as I wasn't using it in my project, but I guess you'll need to add some code for Row.GroupRow. If you can upload a sample I will try and help you out, although now that this forum takes a while for posts to display I can't imagine I can help before the weekend plus I am out of the office on Monday & Tuesday! |
|||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
||
At the top of the BeforeDrawRow event, you could test like this:
This should prevent any errors (aircode, so hopefully I haven't made a mistake). |
|||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|||
JamGodz
Groupie Joined: 25 February 2010 Status: Offline Points: 67 |
Post Options
Thanks(0)
|
||
Hi jpbro and Xander, below is my modification to cater the grouprow highlight.
but it only apply to grouprow coz i only trap to row.grouprow, i need also to filter/highlight the item not only the grouprow. Pls any suggestion would be greatly appreciated. Thanks.
below are my function to strip HTML tags.
[] |
|||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
||
I haven't tested this, but it might work (may need some modifications, but it should put you on the right track):
|
|||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|||
JamGodz
Groupie Joined: 25 February 2010 Status: Offline Points: 67 |
Post Options
Thanks(0)
|
||
Hi jpbro
Thank you so much.. it really work! but how i implented the filter to display only the hilighted data in the reportcontrol? using the txtFilter_Change event. But also how you add the flatedit in the toolbar without any problem coz i have successfully attached the flatedit control but when im going to click the control will move to somewhere in the form or to its original position in design time, but when i used vb6 intrinsic control this will not happen.. pls help. thanks.. |
|||
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 |