If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

print specific text when 'Select All' is chosen as a prompt

Started by DragonLady, 07 Apr 2017 01:46:47 PM

Previous topic - Next topic

DragonLady

I have a multi select prompt that I want to print a specific short text in the report header if 'Select All' is chosen.  This way I don't have this long string of what they've selected; yet I can print on the CA report title what they did select if they wanted one or 2 in the prompt.

Lynn

Quote from: DragonLady on 07 Apr 2017 01:46:47 PM
I have a multi select prompt that I want to print a specific short text in the report header if 'Select All' is chosen.  This way I don't have this long string of what they've selected; yet I can print on the CA report title what they did select if they wanted one or 2 in the prompt.

There is a ParamCount() function that you can use to conditionally show the selected values or a text string depending on how many things were selected. You could play around with that to see if it solves your problem.

DragonLady

Thx. 
I was hoping for something cleaner as I'd have to hard code the max count to compare to, wouldn't I?

Lynn

Quote from: DragonLady on 10 Apr 2017 03:46:52 PM
Thx. 
I was hoping for something cleaner as I'd have to hard code the max count to compare to, wouldn't I?

If you don't have a static list of choices then I think you would have to hard code the comparison value. You could use a query to work it out and conditionally display either the text or the parameter string. This would not require hard coding, although I don't know if you'd say that is cleaner or not.

Attached is a report spec using the Go Sales query package. The prompt is fed by a query. Another query, similar to the prompt query, includes a count of all values and a  count of only the selected items. A third query item returns a text string to indicate if all or some were selected based on comparison of the two counts. In the layout, create a singleton over this query and then conditionally display either the desired "All" message or the parameter display values.