COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: kalyan_sekhar1 on 18 Oct 2005 12:25:21 PM

Title: [Solved] Report Toolbar disabling
Post by: kalyan_sekhar1 on 18 Oct 2005 12:25:21 PM
hi,

I have a situation where i need to disable the Report toolbar basing on the user. As i am changing the following lines in System.XML it is reflecting to all users.

<!-- Modify the below piece of code -->
   <paramÃ,  name="ui_hide">
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  <CRN_HEADER/>
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  <CRN_HEADER_OPTIONS_cc/>
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  <RV_TOOLBAR_BUTTONS_Save/>Ã, 
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, <RV_HEADER/>
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  <RV_HEADER_TITLE/>
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  <RV_HEADER_MENU/>
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  <RV_HEADER_MENU_return/>
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  <RV_HEADER_MENU_about/>
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  </param>

How do i apply this disabling effect only to particular users ?

Thanks
Title: Re: Report Toolbar disabling
Post by: sir_jeroen on 18 Oct 2005 12:37:56 PM
Did you read the board rules? It's all described in the ReportNet documentation
Title: Re: Report Toolbar disabling
Post by: kalyan_sekhar1 on 18 Oct 2005 10:26:29 PM
Hi,

Yup i looked into the documentation, and more over one thing i want to say regarding the Rules. Generally people post to the forums as its need to be addressed immediately. Some times it might be in documentation but in that pressure there is general tendency of by passsing that. So if you guys know where in the documentation, please post the section. I think it wont take much time.

This is my general idea.

Ok coming to the issue. We can hide the objects in Report net by in two ways
by updating in System.XML ( which reflects to the complete cognos, which is not good practise if the Cognos is in shared environment)

second by URL which is something like this

URL&ui=user_interface_elements_to_hide

eg: &ui=h2m1m3 (which hides, Menu and Tools Menu). Now i want to know can any one tell me about the keywords for icons like (PDF, EXCEL, CSV, WORD ......)

If you know the location of documentation please send the section that will be helpful

Thanks
Title: Re: Report Toolbar disabling
Post by: sir_jeroen on 19 Oct 2005 08:50:37 AM
Here's a direct url to the documentation:
http://localhost/crn/documentation/en/ug_cra_cstm_cc2.html#1097947
It's under "Customizing Cognos Connection" in the documentation for "Administering ReportNet"
Title: Re: Report Toolbar disabling
Post by: ratikant on 21 Oct 2005 01:05:38 AM
Hi,
This customization applies to the Cognos Connection. Is there any documentaion describes the customization of Report Viewer. when I am executing the report from Cognos Connection, along with the Report Viewer, report's Name is also coming. How can I customize this.

Thnx.
Title: Re: Report Toolbar disabling
Post by: sir_jeroen on 21 Oct 2005 11:44:05 AM
Read further up the documentation.... It's all explained there..
Title: Re: Report Toolbar disabling
Post by: kalyan_sekhar1 on 21 Oct 2005 01:27:56 PM
Hi,

The document describes on hiding the toolbar as a whole tb=0 from URL , as i am not permitted to touch anything in system.XML. How do i achieve the hiding individual icons (PDF,Excel, Email ...) using URL method

Thanks
Title: Re: Report Toolbar disabling
Post by: sir_jeroen on 21 Oct 2005 01:34:13 PM
You can do it by adding it to the url but... if you want to make it permanent, system.xml is the only place to do this...
Title: Re: Report Toolbar disabling
Post by: CoginAustin on 21 Oct 2005 02:15:40 PM
Add an HTML element to your report page and add:

<style>
.topRow { display: none }
</style>

This will remove the entire header.. buttons and all..
Title: Re: Report Toolbar disabling
Post by: sir_jeroen on 21 Oct 2005 02:23:37 PM
In this case you could also add it to your CSS file...
Title: Re: Report Toolbar disabling
Post by: kalyan_sekhar1 on 21 Oct 2005 02:31:58 PM
Hi,

Thanks for that info, but i want to hide only three icons in the toolbar .. RUN, SAVE AS, EMAIL . This i dont want to apply in system.xml, as it effects entire cognos. I want too apply hide for the above icons at the run time of the report view

Thanks
Title: Re: Report Toolbar disabling
Post by: CoginAustin on 21 Oct 2005 02:43:29 PM
Nearly the same thing:

Add an HTML element and add:

<script language=javascript>
function hideit(id) {
if (document.getElementById) { // DOM3 = IE5, NS6
Ã,  Ã, document.getElementById(id).style.display = 'none';
}
else {
Ã,  Ã, if (document.layers) { // Netscape 4
Ã,  Ã,  Ã, document.id.display = 'none';
Ã,  Ã, }
Ã,  Ã, else { // IE 4
Ã,  Ã,  Ã, document.all.id.style.display = 'none';
Ã,  Ã, }
}
}

hideit('Run');
hideit('Save');
hideit('ReportViewSave');
hideit('Send');
</script>
Title: Re: Report Toolbar disabling
Post by: kalyan_sekhar1 on 21 Oct 2005 05:05:47 PM
Hi,

I executed the script , I just created a blank report and copied the script into HTML tag. When i tried to execute it is giving javascript error

"Run time error occurred ........... Object Required ........ "

Here is the XML of the report

<report xml:lang="en-us" xmlns="http://developer.cognos.com/schemas/report/1/"><!--RS:1.1-->
   <layoutList>
      <layout>
         
      <pageSet>
            
         <page name="Page1">
               <pageBody><HTMLItem>
                     <HTML>&lt;script language="JavaScript"&gt;
function hideit(id) {
alert(document.getElementById);
if (document.getElementById) { // DOM3 = IE5, NS6

   document.getElementById(id).style.display = 'none';
}
else {
   if (document.layers) { // Netscape 4
alert("else");
     document.id.display = 'none';
   }
   else { // IE 4
alert("else");
     document.all.id.style.display = 'none';
   }
}
}

hideit('Run');
hideit('Save');
//hideit('ReportViewSave');
//hideit('Send');
&lt;/script&gt;</HTML></HTMLItem>
               </pageBody>
            </page></pageSet></layout>
   </layoutList>
</report>
Title: Re: Report Toolbar disabling
Post by: sir_jeroen on 21 Oct 2005 05:18:14 PM
<script language="JavaScript">
function hideit(id) {
if (document.getElementById) { // DOM3 = IE5, NS6

   document.getElementById(id).style.display = 'none';
}
else {
   if (document.layers) { // Netscape 4
     document.id.display = 'none';
   }
   else { // IE 4
     document.all.id.style.display = 'none';
   }
}
}

hideit('Run');
hideit('Save');
</script>
Title: Re: Report Toolbar disabling
Post by: sir_jeroen on 21 Oct 2005 05:18:30 PM
This code works for me...
Title: Re: Report Toolbar disabling
Post by: CoginAustin on 21 Oct 2005 05:22:29 PM
Ya you didnt copy it correctly or something. You have a popup alert happening in there with no real object assigned to it..

Try copying exactly the  code that RNAddict put it above and try again.. It does work.. Trust me :P
Title: Re: Report Toolbar disabling
Post by: kalyan_sekhar1 on 21 Oct 2005 05:53:23 PM
Thanks man... it works

i removed the hideit('Save'); then it worked. I am using Cognos 1.1 MR2 .. But i got the result tht i am looking for

Thanks for the great help,
Title: Re: [Solved] Report Toolbar disabling
Post by: brucer on 23 Feb 2006 01:43:50 PM
Greetings - first time post. This works in HTML format but any suggestions when running in PDF format?
Title: Re: [Solved] Report Toolbar disabling - RS icon in Cognos Viewer
Post by: ub14 on 21 Aug 2009 06:21:45 AM
Hi all

How to disable to report studio icon in Cognos 8.4 Cognos Viewer globally, i couldnot find related item in system. xml file.

Thanks in advance
ub