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

Deleteing an Autosearch criteria at runtime

edited September 2004 in RAP
Where would I find a code example that illustrates how to delete an
autosearch criteria at runtime?
ie:

procedure ReportBeforeAutoSearchDialogCreate;
var
endDateField:TppAutoSearchField;
begin
endDateField:=Report.AutosearchCriteriaByName('Schedule_SActivity','Schedule_SActivity.SCH_START_DATE');
if endDateField<>nil then
{this is where I'd like to delete this field}
end;

Comments

  • edited September 2004

    I tried a simple example like this

    if Report.AutoSearchFieldCount > 0 then
    Report.AutoSearchFields[0].Free;

    Report.ShowAutoSearchDialog := Report.AutoSearchFieldCount > 0;


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



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.