Changing Description Calculation for TppAutoSearchField
Is there an easy way to change to TppAutoSearchField.Description method?
I have a custom autosearch that allows the user to pick multiple records.
The description comes back as "Show all data where the... DEMO1223232,
DEMO1223233, DEMO1223234". It is returning the values that are being applied
to the autosearch field.
I want to display the name of the record instead of the ID.
Is this possible? Will it be possible in a later version?
I have a custom autosearch that allows the user to pick multiple records.
The description comes back as "Show all data where the... DEMO1223232,
DEMO1223233, DEMO1223234". It is returning the values that are being applied
to the autosearch field.
I want to display the name of the record instead of the ID.
Is this possible? Will it be possible in a later version?
This discussion has been closed.
Comments
dialog, then use the Data Dictionary component. Run the Auto Join demo in
the main End User demo directory for an example. Double click the dictionary
at design time to run the Data Dictionary builder.
Alternatively, in the Report.BeforeAutosearchDialogCreate event, you can set
the autosearch field field alias. Use RAP in the end user context.
Report.AutosearchFields[0].FieldAlias := 'Aliased Company Name';
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
The name of the column can be changed via the FieldAlias. We have over 100
custom autosearches and the alias naming works great. But what I'm looking
for is the changing of the value displayed.
Example:
"Show all data where Department Id is in list... DEMO1223232, DEMO1223233,
DEMO1223234".
I want to change the DEMO1223232, DEMO1223233, DEMO1223234 to Department A,
Department B, Department C.
Any ideas?
"translated" values in a list control manually. Then create your own custom
autosearch criteria value dictionary. This way you can map the values that
will be used in the SQL with values that will be shown on the search dialog.
You can create a TppAutosearchDialog descendent as shown in the Autosearch
demos, but if you want further control, you can descend from
TppCustomAutosearchDialog and implement the abstract methods and support an
interface that looks like TppAutosearchDialog's. This way you can create any
controls that you want to in the dialog and not be forced to use the
architecture we have constructed for you to use in TppAutosearchDialog.
I see that you are using RB 6.03, here is a demo that works with RB 6.03
that creates a custom autosearch dialog for D6. You'll have to convert it to
work with D5 I believe, but it shouldn't be much effort to do so.
http://www.digital-metaphors.com/tips/CustomAutosearchDialog.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com