Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple values in Picklist prompt question/problem?

Status
Not open for further replies.

ReneeC

IS-IT--Management
Sep 25, 2000
5
0
0
US
Hello,

I am developing reports with Impromptu 7.0. I have created a simple report of a dump of a table (SQL2000 database), but use several different prompts to pull the data. I need to have the ability to choose 'ALL' or multiple or single values. I have used a couple of different techniques to do this. One is that I create a 'Type In' field and as in COGNOS's document #124560, and if the user doesn't type a value in it, then ALL records will be pulled, then right below it I created a 'Report Picklist' and if the 'Type In' above is NOT blank, then the values selected will be used in the filter. This seems to work, but I do have a problem with it.

If I try to display the prompt values in my page header to show what has been selected, I get single values to appear using - Lookup component function. But when I do this, it turns my drop lists into drop down boxes in the PROMPT and only allows me to select 1 value then and not multiple.

Is there a way to display the value of the prompts in a page header especially when you have multiple values selected within one prompt? I can get the single values to appear.

Also, I know I have read faq401-2137 and thread 401-384839. I am including part of the filter that I use here.



clmprvparsts in (if(?PAR_NPAR?='ALL') then (clmprvparsts) else (?PAR_NPAR?)) and (Site_cd in (?RL_DIV?) or ?TypeInDiv?=' ') and Claim_age >= 60


Above, the RL_DIV is the Report Picklist I use and the TypeInDiv is the 'Type In' that I use and explained above. It allows me to have the list and select multiple values. I do have multiple values on the ?PAR_NPAR? one too, but with the way I have it in the filter, it puts it into a drop down, allowing only one value to be selected.

I hope someone out there has some suggestions.

Renee
 
Did you try just putting the Report Detail filter in your header?

I've usually written the filters as such:
(IF(?PAR_NPAR?='ALL') THEN (?PAR_NPAR?='ALL') ELSE clmprvparsts IN (?PAR_NPAR?)) and (IF(?TypeInDiv?='') THEN (?TypeInDiv?='') ELSE (Site_cd in (?RL_DIV?)) and Claim_age >= 60

This is assuming the following:
?PAR_NPAR? = 1)A type-in prompt where multiple values can be entered or 2)A picklist prompt where ALL is a valid selection.
?TypeInDiv? = A type-in prompt, when left blank you want all Site_Cds returned.
?RL_DIV? = A picklist prompt of values to match against Site_Cd, only if ?TypeInDiv? is left blank.

This would allow you to select multiple ?PAR_NPAR? values for the clmprvparsts field, and multiple values for the Site_Cd field.

Pain is stress leaving the body.

DoubleD [bigcheeks]
 
Renee,

The problem with your ?PAR_NPAR? was the filter where
?PAR_NPAR? not in IN comparaison.

When you want to use a multiple picklist, you MUST use prompt in IN comparaison type like this :
'ALL' in (?PAR_NPAR?).

I use many multiple picklists in the same report and it works.

If you want to show what is selected in a picklist, use menu Insert, submenu Prompt and drag it in a header.
You can use a calculation field but it's possible the prompt will be use outside a IN condition and for this case the prompt become drop down only.

Gilles.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top