Here is an example to perform the text search from Delphi code. Text Search wasn't intended to be called in code as the methods are protected, but it was intended to be able to replace the preview classes as shown in this example to let you extend the architecture to call these protected methods from descendents:
Urmm.. but what if I were working on a custom viewer, e.g. with TppViewer and I would like to implement my own form interface for the search function, how would I do it? I was expecting like a function call to the TppReport or TppViewer for the text and maybe properties required and it will find the text??
The search extension http://www.digital-metaphors.com/tips/SearchTips.zip do not seems to work with my report builder 7.02 + D6 version. There are a couple of files I could not run like: SearchHighlightReportmentForm File not found: 'ppDrawTextHighlighter.dcu' SearchDialogProj File not found: 'ppSearchPreview.dcu' TopSearchPanelProj Undeclared identifier: 'AlignTop'
Why is it like that in my version? is there additional stuff I need to download?
Sorry about that Calvin. Looks like those were written for RB 7.01, thought I remember uplodaing the new tips when we released RB 7.02 a few months ago. We had to change the interface a little for a bug fix which is included in RB 7.02. Here are the updated tips in RB 7.02 format:
Thanks. I think I get the picture already now. I cannot design the search UI? All I could do is just parent so somewhere else and change the properties readily available..
You can replace the preview form visually designed, as shown in the RB tutorials, rbPrvDlg.pas, and then add the Text Search UI as you want it. This is an interesting question, unfortunately there isn't a layer that lets you easily create a search engine that runs for the screen preview. Our implementation is designed to work only as a TppCustomSearchPreview descedent. There isn't a visual designed UI text search example. However, it may be possible if you adapt the code in ppTextSearchPreview.pas and ppTextSearchCustomPreview.pas to see how they create a search engine and then you can design the text search controls visually and hook them up to the same event timings that are used in our code and it should work. Then you'll have to use the TppCustomSearchPreview interface as we use it on our preview form replacement example that also has text search in the tips you've downloaded.
Comments
wasn't intended to be called in code as the methods are protected, but it
was intended to be able to replace the preview classes as shown in this
example to let you extend the architecture to call these protected methods
from descendents:
RB7.02 + D6 format:
http://www.digital-metaphors.com/tips/TextSearchInCode.zip
Other extensions to text searching can be surfed here:
http://www.digital-metaphors.com/tips/SearchTips.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
and I would like to implement my own form interface for the search function,
how would I do it? I was expecting like a function call to the TppReport or
TppViewer for the text and maybe properties required and it will find the
text??
not seems to work with my report builder 7.02 + D6 version. There are a
couple of files I could not run like:
SearchHighlightReportmentForm
File not found: 'ppDrawTextHighlighter.dcu'
SearchDialogProj
File not found: 'ppSearchPreview.dcu'
TopSearchPanelProj
Undeclared identifier: 'AlignTop'
Why is it like that in my version? is there additional stuff I need to
download?
I remember uplodaing the new tips when we released RB 7.02 a few months ago.
We had to change the interface a little for a bug fix which is included in
RB 7.02. Here are the updated tips in RB 7.02 format:
http://www.digital-metaphors.com/tips/SearchTips702.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
UI? All I could do is just parent so somewhere else and change the
properties readily available..
tutorials, rbPrvDlg.pas, and then add the Text Search UI as you want it.
This is an interesting question, unfortunately there isn't a layer that lets
you easily create a search engine that runs for the screen preview. Our
implementation is designed to work only as a TppCustomSearchPreview
descedent. There isn't a visual designed UI text search example. However, it
may be possible if you adapt the code in ppTextSearchPreview.pas and
ppTextSearchCustomPreview.pas to see how they create a search engine and
then you can design the text search controls visually and hook them up to
the same event timings that are used in our code and it should work. Then
you'll have to use the TppCustomSearchPreview interface as we use it on our
preview form replacement example that also has text search in the tips
you've downloaded.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com