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 in Reports

Started by dipesh_mistry, 05 Sep 2007 11:41:55 PM

Previous topic - Next topic

dipesh_mistry

Hi All,
I want to do dynamic sorting for all the fields in the reports.After the report runs I shld be able to sort the fields of the reports.

Is there any workaround for this?

Thanks in Advance

Regards,
Dipsy

manishtirpude

Hi,
This can be done through the use of prompts.Below attached tutorial document will help you in achieving dynamic sorting in reports.Please go through it and tell me if it helps you.

Regards,

larsonr

The only problem with this method in the document is that it requires a request back to the application server to regenerate the page.  You could manipulate the DOM of your HTML page to create the effect of automatic sorting after rendering.

By using Javascript and regular expressions, you can create reports that are dynamically sortable on the client side.  The only issue is that the data you populate to the screen now needs to be loaded into the client machine's memory, but this creates the AJAX effect of not having to rebuild the page to sort.

This might be what you are looking for, and can be quite powerful in terms of having a dynamic page that doesn't need to occupy server side cpu time.  The only real problem I foresee is if Cognos changes something in their generation of the page that would break the javascript in future releases.

Suraj

We have some reports that have javascript for hide/show and other functionalities, but the problem with this is that javascript does not do what it is supposed to do if exported to pdf or excel.
So be careful when using javascript as it works with HTML only.

iulian.bobalca

Well I think it is obvious that you cannot do anything dynamic in PDF; as for Excel, you can use the native sort capabilities. 

As far as I can tell, what dipsy is looking for is a "web datagrid control" which unfortunately is not provided bu cognos :) . Using JS might work if we talk about one report, but if he wants to use it on, let's say 50 reports... well that might take a while if the code needs severe changes for each list. And one more thing: this DOM thing will work only for the records loaded on the current page.

dipesh_mistry

Hi All,
Many Many thanx for ur replies.
I have found something on the support site.Plz refer the below link:-
http://support.cognos.com/knowledgebase/googlesearch?load_kb_document=1&dr=kb1&uniqueid=117877

But I m stuck again. Dyamic sorting is done bt i hav drill through on few columns in the list.After implementing dynamic sorting my drill throughs are not working.
Anybody has solution to this?

Thanx again....
Regards,
dipsy

Suraj

That should not happen.
The reports that use dynamic sorting using prompts work perfectly here.
If you have exhausted your options, log a case with cognos.

larsonr

If you are using the dynamic sort, then your drill throughs will be broken due to the nature of DOM sort.  Your javascript has reconfigured the page in essence to set their targets to the same page with a sort function instead of the rendered javascript for your drill throughs.

If you use the prompting method as Suraj is stating, then your drill throughs will work.

dipesh_mistry

Hi,
I have tried using dynamic sorting with prompts option also but still my drill throughs are not working.
Any suggestions?

Regards,
dipsy

Suraj

Try creating a simple test report with dynamic sorting via prompts without any complex calculations or conditional formatting.
If that works, try adding the calculations and conditions that you need for report. It'll tell what is causing the issue.

dipesh_mistry

Hi Suraj,
Do you have any updates on the dynamic sorting issue.
I m still not thru with it.
I have followed the steps given in the  url:-
http://support.cognos.com/knowledgebase/googlesearch?load_kb_document=1&dr=kb1&uniqueid=117877

I have tried both methods given above.
Do I need do modify any of the scripts written in the reports.

Regards,
dipsy