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

CreateAutoSearchField

edited September 2007 in End User
Hi

In the demo of CustomAutoSearchDialog search fields are made :

lAutoSearchField := ppReport1.CreateAutoSearchField('Customer',
'Company', 'Company Name', dtString, soLike, '', False);

in this method the type of the field is set (dtString)

I want to have a dblookupcombo there which i fill my self.

How to do this?

Eric

Comments

  • edited September 2007

    The myASDlg.pas unit in the CustomAutoSearchDialog dialog example project,
    shows how to create a custom autosearch panel class. The example is for a
    calendar date picker that can be used for date field types. You can use the
    same approach to create a custom panel that has a combobox.

    An autosearch dialog is comprised of one panel for each autosearch field. In
    the myAsDlg.pas unit, check out TmyAutoSearchDialog.GetPanelClassForField


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2007
    Hi

    Why is "TppSimpleSearchPanel.ValidateEditControl" not virtual? (7.04)

    i like to use a descendant of TppSimpleSearchPanel to be used with a
    dblookup instead of a edit.
    But i need to override ValidateEditControl

    Eric

  • edited September 2007
    Hi

    I have it working with the dropdown.

    Now i have the following question:

    The example is based on 1 report
    I was the dropdown tp work in the enduser environment where i do not know
    what reports the user is going to make!

    I have a table with companies and its key is company_id , wo whenever a
    users create a report where he wants to select a company_id, i want my
    lookup panel where he can select a company to be used.
    This because the resulting where clause (where company_id = 10) if much
    faster then 'where company like ''.

    So the users decides himself if i wants to use a search on company_id.

    So i need to "ppRegisterForm" my searchclass.
    But where do i put my "GetAutoSearchValues" code?

    Eric


  • edited September 2007
    Hi

    I have it all working!

    Eric

  • edited September 2007
    Hi

    RB is realy a great reporting framework!

    Eric

  • edited November 2007
    Eric,

    Hello. I am just beginning to take a look at AutoSearch and have the same
    requirements that you have ...

    1. The user selects a report template from a list.
    2. I need to give them a popup search dialog, populated with the WHERE
    fields from the underlying template.
    3. Apply the users settings to display the correct range of data records.

    Do you have code snippets / units that you can share and demonstrate how
    this is done?

    Thanks, Patrick

This discussion has been closed.