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

Pre-populate checkbox prompt

Started by Michael75, 23 Sep 2016 07:33:25 AM

Previous topic - Next topic

Michael75

We are running Cognos 10.2.1 FP5. I have a question concerning a checkbox prompt which is:
- fed by a query
- multi-select
- optional
- not cascaded

I'm looking for a non-JS solution to pre-select all the boxes of this prompt.

Why do I want to pre-populate the prompt?
- because my users (numerous, and spread across many sites) have little / no experience of Cognos, and mostly don't know that making no selection in an optional prompt is the same as checking every box
- because by pre-populating it, the parameter associated with the prompt will be filled, and the ParamDisplayValue('my_Param') which is shown in the report header will reflect the actual values used in the selection
- because using the Set Prompt Values option in the report properties is unsuited, given that the data in the dimension behind the prompt query is subject to change

Why no JS solution?
- apart from the usual reasons, because there is no JS expertise in the team, least of all with me  :-[

Apologies if this has been answered before, but a search of the archives didn't come up with an answer.

Thx, Michael

BigChris

All very good reasons, but can I offer some counter suggestions?

1. Put some text on the prompt page to explain that the prompt is optional, and NOT ticking anything is equivalent to ticking everything (you might want to use some better wording than that)
2. Create a variable based on something like ?my_Param? is not missing. Then put your ParamDisplayValue('my_Param') in a block in your header and use your new variable as a render variable, so that it only shows when the user selects something.

Michael75


Quote1. Put some text on the prompt page to explain that the prompt is optional, and NOT ticking anything is equivalent to ticking everything

I'd thought of this, but rather discarded it. In each report concerned, the prompt page is already pretty "busy", as it has several of these optional prompts (as well as half a dozen other prompts). I'd rather not add anything more to the prompt page. Also, of course, it doesn't get the values actually used shown in the report header.

Quote2. Create a variable based on something like ?my_Param? is not missing. Then put your ParamDisplayValue('my_Param') in a block in your header and use your new variable as a render variable, so that it only shows when the user selects something.

This is kind of diametrically opposed to my requirements  ??? What I'm after is a solution that shows the values used when they don't expressly select anything in the prompt. I realise I could adapt this idea, and if ParamValue('my_Param') is null, print something like 'All available prompt values were used in the selection'. But I don't much like that either.

It seems to me that it would be easier if I were able to do what I put in my original request, so I'll state it again.

I'm looking for a non-JS solution to pre-select all the boxes of a checkbox prompt which is:
- fed by a query
- multi-select
- optional
- not cascaded

Does anyone have any ideas?

cognos-t

Hi Michael,

you might be able to accomplish that by using a repeater which will show the user all possible values of a prompt if users don't select single values. The repaeter will be fed by one query which is filtered by the prompt in order to provide all values with are not filtered out by the prompt.

Best regards

AnalyticsWithJay

If you think of the underlying code, all that is required is the word 'checked' or 'selected' within the HTML <input> tag, depending on if you're using select box or radio buttons.

Example:
<input type="radio" name="radioButton" checked>

To do it in Cognos, we would need some way to access the input so we could specify this property. We know of course there's no option for it. I checked the RSClipboardFragment for you (copy the prompt in RS and paste it in notepad), but properties were either placed within CSS styles, or they had their own XML property. There was no way I could enter something into the XML that would force the 'checked' value within the input tag without modifying the DTD/Schema (big hack - not recommended).

With CSS, we can only check if that property is true or not -- we cannot assign it. And so you're left with the only client side language that could do this in JavaScript. Let me know if you change your mind, as the piece of code is really small. An inexperienced programmer shouldn't have trouble maintaining it in the future.

Your Cognos option is to create a Static value such as "Show All Values", and set this value to be the default selection.

Jay

Michael75

Thank you very much Chris, cognos-t and Jay for your input! The variety of feedback one gets here is really great! Having different people with different experience, different skillsets etc. reacting to the same problem...