Sending AutoSearch to another Pipeline
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.
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.
This discussion has been closed.
Comments
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
Eduardo Martinez