Home RAP

AutoSearchPanel.Visible := False

edited May 2004 in RAP
Hello,

Through RAP I want to put visible False to an AutoSearchPanel

I have a query with 2 autosearchfields but it is only neccesary to fill the
second one. The first one gets the value depending of the value introduced
in the second one. Then I use the following procedure to fill the first
autosearchfield:

procedure ReportOnAutoSearchDialogClose;
begin
if Report.AutoSearchFields[1].SearchExpression = '1' then
Report.AutoSearchFields[0].SearchExpression := 'C';
if Report.AutoSearchFields[1].SearchExpression = '2' then
Report.AutoSearchFields[0].SearchExpression := 'L';
if Report.AutoSearchFields[1].SearchExpression = '3' then
Report.AutoSearchFields[0].SearchExpression := 'P';
if Report.AutoSearchFields[1].SearchExpression = '4' then
Report.AutoSearchFields[0].SearchExpression := 'L';
end;

I would like to know how to disable or put visible to false to the first
AutosearchPanel because I don't want the user can see it.

Or can I update two autosearchfields with only one AutoSearchPanel?

Thanks,

Jose Maria Sanmartin

Comments

  • edited May 2004

    Try creating a custom autosearch dialog that handles this requirement. For
    an example, see RBuilder\Demos\AutoSearch\Custom AutoSearch dialog.



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


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited May 2004
    Hello Nard,

    In fact I am using Custom AutoSearch Dialogs but

    1.- I don't know how to use a custom autosearchpanel for two fields

    2.- or How to disable an autosearchpanel and use AutoSearchFields[0] and
    AutoSearchFields[1]. If I disable it in Data Tab I only have an
    AutoSearchField.

    Can you let me know how to do it?

    Thanks,

    Chema




  • edited May 2004
    I solve it with CreateAutoSearchCriteria.

    Regards,

    Jose Maria Sanmartin

    "Jose Maria Sanmartin" escribi? en el mensaje
This discussion has been closed.