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

Sending AutoSearch to another Pipeline

edited January 2005 in RAP
I'm using the EndUser interface to create several query's using query
builder. One of them has the autosearch criterias which I'd like to pass to
the other querys in order to avoid the user to capture the same criteria
several times.


I'm trying this in the ReportAutoSearchDialogClose event:

Report.AutoSearchCriteriaByName('Enero', 'Depatamentos.Departamento') :=
Report.AutoSearchCriteriaByName('Empleados', 'Departamentos.Departamento');

Report.AutoSearchCriteriaByName('Enero', 'Eventos.Fecha') :=
Report.AutoSearchCriteriaByName('Empleados', 'Eventos.Fecha');

Being "Empleado" the query on which I'd like to capture the criteria and
"Enero" the query which I want the criteria is loaded automatically.

Is the code wrong or am I using the wrong event?

Thanks in advance

Eduardo Martinez O.

Comments

  • edited January 2005

    Try using the OnGetAutoSearchValues event to do something like this...


    procedure TForm1.ppReport1GetAutoSearchValues(Sender: TObject);
    begin

    if (ppReport1.AutoSearchFields[1].FieldName = 'Company') then
    ppReport1.AutoSearchFields[1].SearchExpression :=
    ppReport1.AutoSearchFields[0].SearchExpression;

    end;


    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2005
    Thanks a lot, I'll try to do it this way

    Eduardo Martinez
This discussion has been closed.