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

TextSearch - Custom Preview

edited May 2004 in General
RB7 Ent.

I am trying to use TextSearch feature, but I don't undestood how can Search
Text in my Custom Preview.
In ReportBuilter Help I found only TextSearchSetting options.

Thank You

Comments

  • edited May 2004
    Hi Vincenzo,

    Check out the following example of adding the TextSearch feature to a custom
    preview in ReportBuilder.

    http://www.digital-metaphors.com/tips/ReplaceFormAndAddSearch.zip

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2004
    Hi Vincenzo,

    Sorry, I was not aware you needed to use the Outline. Unfortunately, using
    the current method of replacing the preview dialog will prevent you from
    using the outline. If you need the outline, you will need to create a
    preview plugin rather than a replacement form. See the article and the
    example below for an example of create a custom preview using a preview
    plugin.

    http://www.digital-metaphors.com/tips/ShowPageSetupFromPreview.zip

    -----------------------------------------
    Article: Creating a Preview Plugin
    -----------------------------------------

    Q: I've followed the tutorials and registered a Preview Form replacement but
    that did not affect the TppDesigner's Preview workspace.


    A: Do not use the form replacement, but rather, there is a different
    architecture built into the preview form that is registered by default.


    You will need to register a TppPreview descendent. The class you register
    is used to create the preview controls inside the standard print preview
    form and the designer preview workspace.


    Here is an example of creating a simple custom preview that access the
    viewer its been assigned in order to change the page color. You can also do
    more advanced operations such as adding and removing buttons and change the
    behavior of the preview form. Access the inherited controls via. protected
    properties and override the virtual methods in order to customize behavior.

    Open ppPreview.pas and view the TppPreview class as a guide to create a
    custom preview descendent.


    unit MyPreviewPlugin;

    interface

    uses
    ppPreview;

    type
    TMyPreviewPlugin = class(TppPreview)
    public
    procedure BeforePreview; override;

    end;


    implementation

    uses
    Graphics;


    procedure TMyPreviewPlugin.BeforePreview;
    begin
    inherited BeforePreview;

    Viewer.PageColor := clRed;

    end;

    initialization
    TppPreviewPlugIn.Register(TMyPreviewPlugin);

    finalization
    TppPreviewPlugIn.UnRegister(TMyPreviewPlugin);

    end.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2004
    All is ok with this example. Now I am setting TppOutlineViewer in my new
    CustomPreview . I have a different behavior when set in popupmenu visible or
    not visible structure, infact my AccessoryPanel is every visible.
    Can you help me. I send you my Custom Preview. I don't know where I can put
    procedure ConfigureAccessoryPanelVisibility because I can't access to
    EventModify procedure in TppCustomPreview.




This discussion has been closed.