Cognos displays Text prompt instead of value prompt

1.3k views Asked by At

I have a list report built using a simple SQL and not using any package, which displays say 10 records and some columns and 'UserName' is one of the columns (query item). I added a filter in detailed query expression window as [UserName] = ?user_name?.

When the report is run, it should display a value prompt (a drop down to select the value) but, interestingly, Cognos shows a text prompt. Why this behavior? Please advise how to make it a drop down.

1

There are 1 answers

0
Marcus Rickert On

What happened here is that you did not explicitly create a prompt element for your filter criterion on your prompt page. Before Cognos executes a report it checks whether all parameters (e.g. ?filtername?) declared in filters have a matching prompt on the prompt page. For all parameters without prompt elements it will create a default one (on the fly) and apparently chooses the easiest possible variant for your text attribute which is a Text Box Prompt.

If you want to have a drop down box you will have to create the prompt element yourself by dragging a Value Prompt to your prompt page and follow the wizard which will pop up. Make sure that you choose the parameter name that you have used in your filter.