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

Sorting based on the user selection in promptpage

Started by kvchowdary, 30 Jun 2016 02:25:52 AM

Previous topic - Next topic

kvchowdary

Hi,

I have a value prompt  to display products,if my user selects 10 products after that my user wants an option like Ascending,Descending

After selecting the products from the prompt,if he clicks on ascending,it should shows in ascending

env:Cognos10.2
Thanks

HalfBloodPrince

what exactly you want to sort product names asc /desc or any amount like price for the product ??

kvchowdary

Hi

Thanks for your reply

If my user selects 5 products from the prompt and he wants another prompt like ascending/desc,after selecting products if he clicks on ascending in the product prompt itself it should show as asc

hespora

#3
In your Prompt page, add:

- 1 value prompt, create new Parameter "pSort", don't create filter, don't create query. In its properties, add static choices ASC and DESC (exactly!), change Select UI to radio button group, add default selection ASC.

- 1 value prompt for your data item you want the user to do his selection on.

- 1 prompt button, in its properties change Type to Reprompt. 

in your query for the actual prompt, add a data item "Sort":

Rank([YourFieldGoesHere] #prompt('pSort','token')#)

Go back to your prompt page, and in the properties for your actual value filter, select your data item "Sort".

/edit: as far as I can tell, this *only* works on a relational datasource. Rank function seems to work differently on dimensional.

cognos-t

#4
Alternativly you can work with conditional blocks. The first 3 steps are similar to hespora's solution.

Place a conditional block on your report page and link your parameter "pSort" to this block. Put your lists in the block and sort them accordingly.

Best regards