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

How to manually set search criteria

edited December 2003 in End User
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

Comments

  • edited December 2003

    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
This discussion has been closed.