How to manually set search criteria
Hello All,
I am using ReportBuilder Enterprise version 7.03
Is there a way to change the auto search values (dates) in other queries
based on the Auto search values collected on another query?
example of what I have tried is this and it did not work:
Report.AutoSearchCriteriaByName('Employee_Charge','Employee_Charge.DATE').se
archExpression :=
Report.AutoSearchCriteriaByName('Employee_Incentive','Transaction_File.DATE'
).searchExpression;
Also which event is the best place to put it?
Thanks,
Doug
I am using ReportBuilder Enterprise version 7.03
Is there a way to change the auto search values (dates) in other queries
based on the Auto search values collected on another query?
example of what I have tried is this and it did not work:
Report.AutoSearchCriteriaByName('Employee_Charge','Employee_Charge.DATE').se
archExpression :=
Report.AutoSearchCriteriaByName('Employee_Incentive','Transaction_File.DATE'
).searchExpression;
Also which event is the best place to put it?
Thanks,
Doug
This discussion has been closed.
Comments
1. One approach would be to define only a single search criteria as
AutoSearch. The other search criteria would not be designated as autosearch
and therefore would not show up in the dialog. You would need to write code
to extract the SQL object for each
query dataview and apply the search criteria.
I code an example of this that you can download:
http://www.digital-metaphors.com/tips/AutoSearchDateToCriteria.zip
2. Another approach would be to use the Report.OnGetAutoSearchValues event
to set the other search criteria. Below is a simple example.
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
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com