AutoSearchDescription
Hello all,
I am an end user, trying to display the values entered in the AutoSearch
dialog. I am using Memo1.lines.text:= Report.AutoSearchDescription
and
Report.GetAutoSearchDescriptionLines(Memo1.lines);
This returns the the promt and the data entered. Is thera a way to just
return the data entered?
Chris Lawery
I am an end user, trying to display the values entered in the AutoSearch
dialog. I am using Memo1.lines.text:= Report.AutoSearchDescription
and
Report.GetAutoSearchDescriptionLines(Memo1.lines);
This returns the the promt and the data entered. Is thera a way to just
return the data entered?
Chris Lawery
This discussion has been closed.
Comments
values directly of the autosearch field objects. Look at our source for
example of how to do this:
procedure TppReport.GetAutoSearchDescriptionLines(aLines: TStrings);
var
liIndex: Integer;
begin
aLines.Clear;
for liIndex := 0 to AutoSearchFieldCount - 1 do
begin
if (aLines.Count = 0) then
AutoSearchFields[liIndex].FirstField := True;
{ignore those fields where no criteria was entered by user in AS
Dialog}
if (String(AutoSearchFields[liIndex].Value) <> '') then
aLines.Add(AutoSearchFields[liIndex].Description);
end;
end; {procedure, GetAutoSearchDescriptionLines}
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Thanks for the reply. I have little to no Delphi experience so please
bare with me. The following is what I entered in Report Builder:
procedure ReportAfterAutoSearchDialogCreate;
var
aLines: TStrings;
liIndex: Integer;
begin
aLines.Clear;
for liIndex := 0 to Report.AutoSearchFieldCount - 1 do
begin
if (aLines.Count = 0) then
Report.AutoSearchFields[liIndex].FirstField := True;
if (String(Report.AutoSearchFields[liIndex].Value) <> '') then
aLines.Add(Report.AutoSearchFields[liIndex].Description);
end;
variable3.value := Report.AutosearchFields[liIndex]
end;
I receive the following errors when I try to compile in Report Builder:
Error: ReportAfterSearchDialogCreate, Line 10: Expected: '(' or '[', but
found 'FirstField' instead
Error: ReportAfterSearchDialogCreate, Line 13: Expected: '(' or '[', but
found 'Description' instead
Any further assistence would be greatly appreciated.
Thanks in advance,
Chris Lawery
policy is to only support our customers (the Delphi developers) and not
their end users. Please understand that you should contact your application
vendor for support.
Use the Memo.OnPrint event to do this.
Try deleting the lines I commented below.
Then try using Value instead of Description as I changed below.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
like to add this option for you:
Contact your vendor and have them code a RAP pass through function to do
this more easily so you only have to code one line of code to populate the
memo with the autosearch values only and not the full descriptions.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com