autosearchcriteria and all pressed.
Hello,
I pull the autosearchcriteria from the report after they are filled and put
them back with a criteria I fill.
But when in the report a standard value is entered and the print all box for
that criteria is checked then I stil get values.
In order to prevent me from using those criteria I need to know How I can
see if the print all checkbox is checked.
I use this code to pull the criteria into arrays:
if dmReport.ppReport.AutoSearchFieldCount > 0 then
begin
AantalCriteria := dmReport.ppReport.AutoSearchFieldCount;
SetLength(AVeld,AantalCriteria);
SetLength(ATable,AantalCriteria);
SetLength(FilterCriterium,AantalCriteria);
SetLength(AOperator,AantalCriteria);
for I := 0 to dmReport.ppReport.AutoSearchFieldCount -1 do
Begin
AVeld[I] := dmReport.ppReport.AutoSearchFields[I].FieldName;
ATable[I] := dmReport.ppReport.AutoSearchFields[I].TableName;
FilterCriterium[I] :=
dmReport.ppReport.AutoSearchFields[I].SearchExpression;
AOperator[I] :=
dmReport.ppReport.AutoSearchFields[I].OperatorAsString;
End;
for I := 0 to AantalCriteria -1 do
Begin
fSQLBuilder.SearchCriteria.Remove(ATable[I],AVeld[I]);
End;
fSQLBuilder.ApplyUpdates;
for I := 0 to AantalCriteria -1 do
Begin
fSQLBuilder.SearchCriteria.AddAutoSearch(ATable[I],AVeld[I],AOperator[I],FilterCriterium[I]);
End;
fSQLBuilder.ApplyUpdates;
end;
Best regards,
Rob Nowee
I pull the autosearchcriteria from the report after they are filled and put
them back with a criteria I fill.
But when in the report a standard value is entered and the print all box for
that criteria is checked then I stil get values.
In order to prevent me from using those criteria I need to know How I can
see if the print all checkbox is checked.
I use this code to pull the criteria into arrays:
if dmReport.ppReport.AutoSearchFieldCount > 0 then
begin
AantalCriteria := dmReport.ppReport.AutoSearchFieldCount;
SetLength(AVeld,AantalCriteria);
SetLength(ATable,AantalCriteria);
SetLength(FilterCriterium,AantalCriteria);
SetLength(AOperator,AantalCriteria);
for I := 0 to dmReport.ppReport.AutoSearchFieldCount -1 do
Begin
AVeld[I] := dmReport.ppReport.AutoSearchFields[I].FieldName;
ATable[I] := dmReport.ppReport.AutoSearchFields[I].TableName;
FilterCriterium[I] :=
dmReport.ppReport.AutoSearchFields[I].SearchExpression;
AOperator[I] :=
dmReport.ppReport.AutoSearchFields[I].OperatorAsString;
End;
for I := 0 to AantalCriteria -1 do
Begin
fSQLBuilder.SearchCriteria.Remove(ATable[I],AVeld[I]);
End;
fSQLBuilder.ApplyUpdates;
for I := 0 to AantalCriteria -1 do
Begin
fSQLBuilder.SearchCriteria.AddAutoSearch(ATable[I],AVeld[I],AOperator[I],FilterCriterium[I]);
End;
fSQLBuilder.ApplyUpdates;
end;
Best regards,
Rob Nowee
This discussion has been closed.
Comments
When the "Show All Values" checkbox is checked, the
AutoSearchField.ShowAllValues property is set to True. You should be able
to use this property to know whether the user selected this option.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com