Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

How to perform text search on TppViewer?

edited February 2012 in General
Hi,

The default ReportBuilder preview form has text search function that
able to search the text in report.

I am using TppViewer to show the report. How to utilize the text search
function for TppViewer?

--
Best regards,
Chau Chee Yang

Comments

  • edited February 2012
    Hi Chau Chee,

    You can manually create a TppTextSearchPreview object and assign its
    Viewer property. It also needs a panel to reside in. Below is some
    sample code.

    lTextSearchPreview := TppTextSearchPreview.Create(self);

    lTextSearchPreview.Viewer := ppViewer1;
    lTextSearchPreview.TextSearchSettings.Visible := True;
    lTextSearchPreview.TextSearchSettings.Enabled := True;
    lTextSearchPreview.CreateControls(Panel1);
    lTextSearchPreview.ArrangeControlsVertically;
    lTextSearchPreview.BeforePreview;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2012
    Hi NG,

    I just realized that if I have a 200 page report and the default setting
    is only calculating 100 pages ahead and I search for a common word that
    appears on each page of the report and I click the "last occurance"
    symbol in the TTextSearchPreivew it will go the last occurance on page
    100 although more occurances will follow.
    I guess it is linked to the number of pages you calculate in advance.
    But I think RB should at that moment calculate the rest of the report
    before performaning the actual search.
    Do you agree?

    Stephan
  • edited February 2012
    Hi Stephan,

    You are correct. We will try to get this added into the next release of
    ReportBuilder.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2012
    Hi,

    When testing the search function I found that the function automatically
    changes the page to the one where the "active" search result is located.
    That's good. :)

    However if the user views the page with a high zoom level, then ppViewer
    does not scroll automatically to the location of the search result on
    the page. Is it possible to implement this feature somehow?
    I have already checked the RB source code, but all information of the
    search engine seem to be stored in private methods and properties and
    therefore are not utilizable.

    --
    Best regards,
    David Bakker
  • edited March 2012
    Hi David,

    Which version of ReportBuilder are you using? For versions earlier than
    14, ReportBuilder does try to navigate to the location on the page that
    the text resides. For RB 14 with the new previewer, this feature is not
    yet implemented however you can set the
    PreviewFormSettings.SinglePageOnly property to True to revert back to
    the older viewer which supports this feature.

    I have added this as an enhancement to research and implement for a
    later release and will keep you up to date as progress is made.

  • edited March 2012
    Nico,

    don't you think that your customers updating from version 12 to 14 will
    miss this feature? I would call it a bug if that was the fact before and
    is gone in the new release even if there is a flag to get back to the
    old functionaly again. THe reason we purchased the new release are the
    new features.
    Please rethink your decision to not implement it immediately.

    Thanks for the ongoing support,

    Stephan
  • edited March 2012
    I apologize for the misunderstanding. By "later release" I meant an
    upcoming maintenance release (hopefully 14.05).

    The new viewer/preview was a complete re-write from the old one. We
    worked diligently to include all the features of the old viewer however
    some either could not, or did not yet make it in. We will continue to
    enhance the new viewer to include as much as we can however being that
    it was a complete re-design/re-write, providing a simple patch is
    usually not immediately possible.

    Thanks for your patience and support.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2012
    Nico,

    thanks for the clarification.
    We will patiently wait for 14.05 then.
    I fully appreciate the work you have put into the redesign for Version 14!

    Thanks,

    Stephan
This discussion has been closed.