Preparing a textbox in a request options form as dropdown list

Hi,

I´m new at this forum and would like to get an answer to the following issue:

Designing an option form of a report I need a textbox, where one can choose from different options by displaying a dropdown list. The options should come from the field “Code” of the table “Location”. My trial was to define a variable “LocationCode” with type Code (Length 10) and put it at SourceExpr-field in the PropertyList of the Textbox. Hence I assigned “Location.Code” as the TableRelation. Unfortunatly after running this report the Textbox didn’t show a dropdown list.

What would help to fix it?

Many thanks for all advices.

effdi

Welcome to DUG!!!

Define Locationcode with datatype Option

On Locatiioncode varialbe press shift+F4 and put your desire values

Hi Amol,

following your advice I was able to some options into the optionstring (which is plain text I assume).

After running this version if I choose an option from the list this error message appears:

The constant must fit to the field Code at type and length.
Type: Code10 ← Option
Field: Code ← 1
Table: Location

On the other hand, I was to get a solution where the population of the optionlist is driven by the code-column of the location-table.

Any ideas how solve the problem? Maybe there is no way to get it from the Request Options Form…

Did you try by simply setting TableRelation property of text box to Location?

Create a global variable(Code type Length 20)

add text box in request form

set above created variable as SourceExpr for text box

Set TableRelation property of text box to Location

Hi Mohana,

this was exactly my first trial.

What happens is: I get a textbox in my request form where I can type anything, but no dropdown-list is shown.

By the way, I use german language setting. In case of date-expressions I already found an issue with an hint to enclose them with < and >. Is there a similar trick here?

Do you mean you are not able to get the Lookup option to the text box which you have created?

AHHH, this was the point!

I always tried to use the dropdown property for the textbox.

Now the solution is: Lookup = YES!

Thanks for all your effort!