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

Multi-line text prompt sort order issues in RS

Started by cnu, 10 Jul 2015 04:21:55 PM

Previous topic - Next topic

cnu

I have multi-line text prompt in report , where the user can enter some IDs. The ids will be in some order that the users want preserved in the report.( I.e., they want each record to show up in the order they are entered or pasted into the text prompt) However, while running report the output always is returning the records in ascending order.appreciate if you leave suggestions/comments!

Thanks

cnu


gpollock

I imagine a lot of people haven't responded because they haven't faced this problem before.  Please see the stickied posts for why your post wouldn't get replies.

Regardless, here's something I think should work.  You'll have to do some trial and error for the steps and tweak as necessary.

1) Bring the prompt value into your query as a data item and view tabular data.  Hopefully it's something like 1234,7894,2342  (values separated by comma).  If so, bring that string in, but add a terminating comma so it's always <ID>,<ID>,....<ID>,
2) There is a string function that finds the starting position of one string inside another, but the name escapes me.  Create a data item that uses this function on the ID plus a comma.  For example, ID 1234 should be searched as "1234," and should return 1.  ID 2342 should return 11.
3) In your list item, sort first by the data item created in (2), then use whatever other sorting you want.

Make sure you add the terminating comma in step 1, otherwise, the last entered value will show up first.  Also, make sure in step 2 you add a terminating comma for the search string, or else 1234 will have the same result as 12345.

cnu

The solution you provided that wont work, yo can't directly bring the prompt value into data item through a parameter however if you do so it only lists the top value from Stack, but not entire search list , there is a other way around using external query along with native sql.

anyhow thank you for taking time and providing info on this....much appreciated!