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

Repalcing the autosearch dialog

edited April 2003 in End User
Hi,

How can I replace the autoserach dialog with my own?
I developed a standard dialog that is able to define search criteria field
as checkbox, radiogroup, lookup, etc. and based on what the user put on the
dialog, it produces the "WHERE" condition for the SQL.

I would like:
1. have the possibibility to show my own dialog.
2. access to the SQL it is being processed and add to it the generate
"WHERE" condition the "WHERE" condition prepared by the dialog box

Could someone point me in the right direction?

Thanks

Antonio Budano

Comments

  • edited April 2003
    There is a custom autosearch dialog example in the demo directory in the
    Autosearch folder.

    If you want to create a form without descending from TppAutosearchDialog,
    then you'll have to descend from TppCustomAutosearchDialog. See the
    interface section in ppForms.pas to see what you have to implement.

    What version of RB are you using? This tip was built for RB 6 which does
    this, though it needs a modified version of TppCustomAutosearchDialog in
    ppForms.pas:
    http://www.digital-metaphors.com/tips/CustomAutosearchDialog.zip

    You should still create autosearch fields on the report, and use those field
    values to update the where clause, as shown in the autosearch demos that
    update the Where clause of a TQuery. This piece of the architecture should
    work the same way, wether you use our dialog, or a custom dialog.

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited April 2003
    Jim Bennett (Digital Metaphors) wrote:

    I've not been able to get this program to work. The FVendor and FParts
    are cleared before they can be used and there is always an access
    violation. Are there any more examples of building a custom search dialog?

    Thanks,
    Dave
  • edited April 2003
    Ok, if the 'tip' isn't stable, it has a decent amount of code in it that was
    written some time ago for D6. The demo's approach is the one to take when
    wanting to descend from TppCustomAutosearchDialog. Otherwise, you should
    descend from TppAutosearchDialog and examine our autosearch demos included
    in the RBuilder installation which do this.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited April 2003
    Jim Bennett (Digital Metaphors) wrote:

    Thanks

    Dave
This discussion has been closed.