DBLoopupControl

Hi,

I want to use the control DBLookupControl in my Report.
The functionality is OK, and it fulfills my requirements.
But if the user don't select one valid value in the fields:
ListField the program show the error message. "Ung??ltige Variant-Typumwandlung"-"(Not valide Typ-carsting)".

My problem:
At program start the listbox for ListField is empty and I don't know, how can I set a special default value to avoid this error.

thanks for help
regards David

Comments

  • edited 2:50AM
    Hi David!

    Does it mean 'Invalid variant type conversion'? Well the basic problem is the standard DbLookupCombobox doesn't have a simple meaningless default value and also doesn't have the ability to synchronize itself with the underlying dataset. So if You locate a value in the underlying dataset the combo won't show the field value of that record. I use Dimitry V. Bolshakov's Ehlib that contains the TDbLookupComboboxEh component that has a property DropdownBox.SpecRow. This define a special row that the user can select and this is the default row in the dropdown list. It also has the property KeyValue. If You set this to a PK and call LocateKey the combo will synchronize itself with the dataset. Now the problem is that FR doesn't have similar component. I wrote an FR dialog control based on TDbLookupComboboxEh, it works but it is not perfect yet. In some cases it crashes the designer. Send me your e-mail and when it will works perfectly I will send You. But remember, You must have the Ehlib (www.ehlib.com).

    Regards:Alex

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.