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

Dynamic Sorting on Column Headings in Two (2) Lists on 1 Report

Started by DNA, 28 Mar 2016 03:04:16 PM

Previous topic - Next topic

DNA

Hey Everyone,
I'm in a pickle & out of options so Hopefully there is a Cognos Java Guru out there and you are able to help a fellow CogNerd out! (New to Cognos...)
Using Cognos 10.2.2

Client wants:

  • 1 Prompt Page = Prompt
    1 report = Result Details
    2 lists = (In Process List / Open Query) and (Completed List / Closed Query)

I found this article that works perfect for one list on one report (not 2 lists on 1 report): http://www.cognosonsteroids.com/2012/04/sort-list-report-dynamically-using.html

However when I start inserting the HTML code on the headers of the (Completed List), it only sorts the (Completed List) when I start clicking the (In Process List) header hyperlinks.
I need for both lists to sort dynamically on their own.

This is what I have tried:

  • Put (In Process) and (Completed) lists in separate Blocks
    Both Lists refer to 2 separate queries
    I've tried putting the </script> on the last header, after the list, before the lists.. etc.
    Split the Page Layout
- nothing works. :-\

Can someone please help?
Thanks a ton!

bdbits

Repeat after me: Java is not javascript.

Now that we have that out of the way... the script as provided is using getElementById() and getElementByTagName() so as is, it will only work with one list. It could be modified/expanded to support multiple lists, but you will need javascript skills you do not appear to have yourself. There are lots of generic table-sorting scripts around (often part of frameworks like jquery), but you will still need to understand javascript and the HTML DOM as implemented by Cognos.

Sorry but there is no simple answer here. You really need to find someone who can write/modify javascript, or if you have it the time to learn to do so yourself.