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

Hiding Item in Cognos Viewer

Started by ari_meta, 24 Mar 2011 10:22:16 AM

Previous topic - Next topic

ari_meta

Hi all
I want to hide few buttons in cognos viewer such as keep this version, Drill up Drill down etc. Due to some limitations, I am not allowed to change system.xml file. I found one java script (link below) is not working for me.
https://www-304.ibm.com/support/docview.wss?uid=swg21371494
Any more suggestion please.

Thanks
Ari 

kattaviz

Hi,

What is the version of Cognos u r using? I just took the report spec from the link in your post
and ran the report (I am using Cognos 8.4.1). The drill-down button is disabled. See the atached image.
thanks & regards
Satish Katta

ari_meta

Thanks for reply
It has been disabled, it has not been removed.
I am also using 8.4.1. But it is not working for me at all . I am getting java script error.


Any Clue or any other java script.

Thanks

Ari

kattaviz

Hi,

What is the javascript error u r getting? Can you attach your report spec?
thanks & regards
Satish Katta

AussiePete2011

Hi there

Just my 2.2 cents ..(GST joke)

The problem with using Javascript is that when you upgrade its likely to break.
Why are you not able to modify the system.xml file?  If you are the administrator and this is a general business requirement then it should be performed via a change management process.  The recommended method and only supported method IBM Cognos accepts is via the system.xml file

http://public.dhe.ibm.com/software/dw/dm/cognos/infrastructure/portals/customizing_the_cognos_8_ui.pdf
http://publib.boulder.ibm.com/infocenter/c8bi/v8r4m0/index.jsp?topic=/com.ibm.swg.im.cognos.ug_cra.8.4.0.doc/ug_cra_id28609CustomizetheUserInterfaceBasedonGroupandR.html

https://www-304.ibm.com/support/docview.wss?uid=swg21340486

The only other way is to use a URL that disables the toolbar so the user clicks a hyperlink that imposes this condition

Hiding the Headers and Toolbars within Cognos Connection
Users can remove the headers and toolbars within Cognos Connection to make Cognos Connection fit more cleanly within their other applications.  The "&ui=<list of header to list>" parameter can be used to selectively hide any or all of the following header items.  For example, to remove all of the headers and toolbars, append &ui=h1h2h3h4 to the end of a Cognos Connection URL.  Any combination of titles (t1, t2, t3, t4), menus (m1, m2, m3, m4), and headers (h1, h2, h3, h4), shown below, can be used.

Notes:
•   This only applies within Cognos Connection or Cognos Viewer.  You can hide the headers and toolbars within studios using the ui.header and ui.toolbar properties. 

Hope this helps
Cheers
Peter B

Steve

Quote from: ari_meta on 24 Mar 2011 10:22:16 AM
Hi all
I want to hide few buttons in cognos viewer such as keep this version, Drill up Drill down etc. Due to some limitations, I am not allowed to change system.xml file. I found one java script (link below) is not working for me.
https://www-304.ibm.com/support/docview.wss?uid=swg21371494
Any more suggestion please.

Thanks
Ari

If you want to hide icons from Cognos Viewer then the file you need to modify is viewer-toolbar.xml . It's in <c8.4>/templates/ps/portal or do a windows search. I am not sure of the exact location but it is definately not in the same location as system.xml

I added a Print Icon some time back to print the report from Cognos Viewer so remember the name of the file.

ari_meta

Hi all

Thanks for suggestions. Actually, we are in shared environment, so we can not change system.xml file.

I am attaching here  report specks for Go sales sample package.  I am using cognos 8.4.1 with IE 8.

I will appreciate your suggestions.

Thanks

Ari

AussiePete2011

Hi Ari,

I'd love to be able to tell you there's a solution for your dilema, but without the ability to modify files, or to be able to use customized hyperlinks, or to even create reports via SDK, you are not, I fear going to be able to achieve your goal.

I'd recommend writing a business case to the stakeholders and explaining that if they need this functionality, then they are going to need to provide you the means to achieve this.

Any UI modification will require so alteration to a c8 property file, whether CSS, XML or properties.  Cognos use these files as building blocks to create an output.  The reports are not straight HTML.

Cheers
Peter B

melee

All hope is not lost - I will try a solution tomorrow that should be able to take care of this for you, using a JS item. I will give it a shot and report back.

AussiePete2011

Hi Melee,

Cool.,  Always interested in a solution.  If it does work for you let us know.. I'll add it to my bag of tricks as well. ;-)

Cheers
Peter b

melee

#10
Got it to work. Added an HTML item to the header in the report with this code:


<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function() {
jQuery('img[title="Drill Down"]').hide();
}); // End Ready
</script>


Edit: you can also get rid of the Drill Up button with:

jQuery('img[title="Drill Up"]').hide();

What this is doing is finding all of the img tags with a title of "Drill Down" and adding a CSS property at the element level. This overrides any other styling and becomes the top level style. You may be able to achieve the same thing by using !important and CSS within the report, but there was nothing to indicate that you would have a selector.

Gone in a heartbeat. If you need an explanation of the above code, check out my blog here:

http://nicbertino.com/?p=16