![]() |
[SOLVED] How does FindRecordItem work? |
Post Reply ![]() |
Author | |
Jebo ![]() Senior Member ![]() Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
![]() ![]() ![]() ![]() ![]() Posted: 11 December 2008 at 12:54pm |
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Yes, would be nice to have an example. I tried a lot but without succes. Looks like the method is still under construction...
|
|
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.... |
|
![]() |
|
Stilki ![]() Groupie ![]() Joined: 27 May 2005 Status: Offline Points: 70 |
![]() ![]() ![]() ![]() ![]() |
I can't get it working as well.
Not enough information in Help or any sample. |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Support member Mark gave me sample. It doesn't work for me but he said it should work. I tried with V12.1.0 and V12.1.1
Let someone else have a try with the code snippet and please let me know if it works for you.
Dim repRecItem As ReportRecordItem
Dim iCols, iRows Dim sArg As String sArg = "James HOWLETT" iCols = wndReportControl.Columns.Count iRows = wndReportControl.Rows.Count Set repRecItem = wndReportControl.Records.FindRecordItem(1, iRows, 1, iCols, 1, 1, sArg, xtpReportTextSearchExactPhrase) repRecItem.ForeColor = RGB(255, 0, 0) Thanks in advance
|
|
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.... |
|
![]() |
|
Jebo ![]() Senior Member ![]() Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
![]() ![]() ![]() ![]() ![]() |
Hi Aaron,
this code can't work because the ReportControl has a bug and will be fixed in the next release...! Here you can read the comment from CJ-Support-Team: Notes: ------------------------------------------- ****Note by Doubson, Mark, 12 Dec 2008: You right - it was a buggy code. I fixed it and code will go to next release |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi Jebo,
Thanks for reply.
I'm glad it is a BUG because I thought it was me, I tried a lot (including simular code like Mark suggested) but it failed everytime.
|
|
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.... |
|
![]() |
|
Stilki ![]() Groupie ![]() Joined: 27 May 2005 Status: Offline Points: 70 |
![]() ![]() ![]() ![]() ![]() |
Hi All,
Just confirming the BUG that has been acknowledged.
I tried the above code and various other permutations to no avail.
|
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
There is interm release version from 2008, Dec, 17 Report ActiveX with working FindRecordItem function. Ask Kirk or Mike to send it to you
|
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi Mark,
Is there any chance of fixed issues (major issue post) in interm release
![]() Thanks
|
|
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.... |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
Well I will but you can browse the MFC discussion - which is very usefull as ActiveX is always depends from ToolkitPro code
|
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi Mark,
I tested the method in V13.0.0 and still get an error: "Object variable or With block not set"
I used same code snippet as you wrote in previous reply.
|
|
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.... |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
![]() to test using VB ReportSample code - in frmMain modify function:
Private Sub mnuFieldChooser_Click()
' FieldChooser is used to add or remove fields (i.e. columns) using drag-and-drop. ' FieldChooser is an analogue of a pool with column headers of non-used columns 'Displays a form with a FieldChooser control 'frmFieldChooser.Show 0, Me 'Associates a FieldChooser control with a ReportControl on another form as a result of call you will see red as in snapshot I run right now
|
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
btw - are you sure that you use release 13 activex?
|
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi Mark,
OK, I got it to work and maybe this was same problem in V12.1.1
If you try to find an item and searchtext would be exactly the same as a reportitem and you use 'xtpReportTextSearchExactPhrase' you will get the error I mentioned.
I will do some testing and I will let you know.
|
|
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.... |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
No - it does not work in Release 12.
|
|
![]() |
|
Jebo ![]() Senior Member ![]() Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
![]() ![]() ![]() ![]() ![]() |
mmmh, there is something strange...
if I search for "JamEs hoWleTt" with xtpReportTextSearchExactPhrase there will be find the record. BUT if I search for "James Howlett" (this is the realy exactly Name!) with xtpReportTextSearchExactPhrase there will DON'T find the record! ![]() WHY? Here is the sample (it seems like the same bug since before - v12.x): Dim repRecItem As ReportRecordItem, iRows As Long, sArg As String iRows = wndReportControl.Rows.Count sArg = "James Howlett" Set repRecItem = wndReportControl.Records.FindRecordItem(1, iRows, 3, 3, 1, 1, sArg, xtpReportTextSearchExactPhrase) If repRecItem Is Nothing Then Beep Else wndReportControl.SetFocus wndReportControl.FocusedRow = wndReportControl.Rows.FindRow(repRecItem.Record) wndReportControl.FocusedRow.EnsureVisible End If |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi @Jebo
Is it possible to test this in V12.1.1 ?
I also mentioned that this could be same problem in previous version. Another thing: Can you make this post a sticky one? Do not let this post slide down
![]() Thanks a lot
|
|
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 |
![]() ![]() ![]() ![]() ![]() |
Hi,
I did a test myself with V12.1.0 and it does work the same as in V13.0.0
You will get an error when using xtpReportTextSearchExactPhrase. So this is definitely a bug!
@Jebo: Please change your topic description and change the topic into a sticky one
Thanks a lot
|
|
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.... |
|
![]() |
|
Jebo ![]() Senior Member ![]() Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
![]() ![]() ![]() ![]() ![]() |
done!
|
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi @Jebo,
Thanks for that
![]() I just wanted to say that I forgot to unregister V13.0.0 ocx so that's why I said it works the same as in V12.1
![]() It looks like the method isn't working at all (V12.1) as Mark already replied.
But the fact remains that this is a bug in new version, so leave the description as is...
Thank you
|
|
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.... |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
YOU RIGHT - code SKIP pure xtpReportTextSearchExactPhrase case!
While case xtpReportTextSearchExactPhrase AND xtpReportTextSearchMatchCase properly covered.
I will fix it - you can use also code 0 - it works properly. P.S. Case fixed and next beta-release will have proper code for ToolkitPro and ActiveXs
|
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi Mark
With new OCX this is solved but now it will give error on xtpReportTextSearchMatchCase
Thanks
|
|
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.... |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
You right - it was wrong internal function (Left instead of Mid!) call - "Search case-non-sensetive item Which STARTED with given pattern".
It also make sense - but with special flag (may be in future?). For now I fix it to cover general case - "Search case-non-sensetive item Which HAS given pattern as substring"
|
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
We have now new flag for FindRecordItem function (xtpReportTextSearchExactStart) which means only string starting with pattern return (not pattern inside case) and new function FindRecordItemByRows which use same flag set but operate with Rows instead of Records - same way you can sort your report and call this function after e.g. providing top 10 rows as search positions
|
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
This issues has been solved in V13.1
![]() Thanks
|
|
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.... |
|
![]() |
|
Jebo ![]() Senior Member ![]() Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
![]() ![]() ![]() ![]() ![]() |
Oh, that sounds great!
![]() |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
there is also another function for search:
IReportRecordItem* FindRecordItemByRows(long StartIndex, long EndIndex, long StartColumn, long EndColumn, long Record, long Item, BSTR Text, XTPReportTextSearchParms Flags);
it is good for already sorted case |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi @Jebo,
Would be best you would remove "the sticky part" of your post and add SOLVED to description. Now it looks like it's still a BUG and we don't want that, right?
Thanks
|
|
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.... |
|
![]() |
|
Jebo ![]() Senior Member ![]() Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
![]() ![]() ![]() ![]() ![]() |
Done.
|
|
![]() |
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 |