Deleteing an Autosearch criteria at runtime
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;
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;
This discussion has been closed.
Comments
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