Author Topic: [Solved] Report Toolbar disabling  (Read 3807 times)

Offline kalyan_sekhar1

  • Community Leader
  • *****
  • Posts: 102
  • Forum Citizenship: +7/-8
[Solved] Report Toolbar disabling
« on: 18 Oct 2005 11:25:21 am »
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
« Last Edit: 21 Oct 2005 04:54:52 pm by ReportNet Addict »

Offline ReportNet Addict

  • Global Moderator
  • Statesman
  • *****
  • Posts: 831
  • Forum Citizenship: +61/-40
  • Creator of the Impact Suite
    • The Impact Suite
Re: Report Toolbar disabling
« Reply #1 on: 18 Oct 2005 11:37:56 am »
Did you read the board rules? It's all described in the ReportNet documentation

Offline kalyan_sekhar1

  • Community Leader
  • *****
  • Posts: 102
  • Forum Citizenship: +7/-8
Re: Report Toolbar disabling
« Reply #2 on: 18 Oct 2005 09: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

Offline ReportNet Addict

  • Global Moderator
  • Statesman
  • *****
  • Posts: 831
  • Forum Citizenship: +61/-40
  • Creator of the Impact Suite
    • The Impact Suite
Re: Report Toolbar disabling
« Reply #3 on: 19 Oct 2005 07: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"
« Last Edit: 19 Oct 2005 07:52:18 am by ReportNet Addict »

Offline Ronaldo

  • Full Member
  • ***
  • Posts: 12
  • Forum Citizenship: +1/-0
Re: Report Toolbar disabling
« Reply #4 on: 21 Oct 2005 12: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.

Offline ReportNet Addict

  • Global Moderator
  • Statesman
  • *****
  • Posts: 831
  • Forum Citizenship: +61/-40
  • Creator of the Impact Suite
    • The Impact Suite
Re: Report Toolbar disabling
« Reply #5 on: 21 Oct 2005 10:44:05 am »
Read further up the documentation.... It's all explained there..

Offline kalyan_sekhar1

  • Community Leader
  • *****
  • Posts: 102
  • Forum Citizenship: +7/-8
Re: Report Toolbar disabling
« Reply #6 on: 21 Oct 2005 12: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

Offline ReportNet Addict

  • Global Moderator
  • Statesman
  • *****
  • Posts: 831
  • Forum Citizenship: +61/-40
  • Creator of the Impact Suite
    • The Impact Suite
Re: Report Toolbar disabling
« Reply #7 on: 21 Oct 2005 12: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...

Offline CoginAustin

  • Community Leader
  • *****
  • Posts: 189
  • Forum Citizenship: +10/-0
Re: Report Toolbar disabling
« Reply #8 on: 21 Oct 2005 01: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..

Offline ReportNet Addict

  • Global Moderator
  • Statesman
  • *****
  • Posts: 831
  • Forum Citizenship: +61/-40
  • Creator of the Impact Suite
    • The Impact Suite
Re: Report Toolbar disabling
« Reply #9 on: 21 Oct 2005 01:23:37 pm »
In this case you could also add it to your CSS file...

Offline kalyan_sekhar1

  • Community Leader
  • *****
  • Posts: 102
  • Forum Citizenship: +7/-8
Re: Report Toolbar disabling
« Reply #10 on: 21 Oct 2005 01: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

Offline CoginAustin

  • Community Leader
  • *****
  • Posts: 189
  • Forum Citizenship: +10/-0
Re: Report Toolbar disabling
« Reply #11 on: 21 Oct 2005 01: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>

Offline kalyan_sekhar1

  • Community Leader
  • *****
  • Posts: 102
  • Forum Citizenship: +7/-8
Re: Report Toolbar disabling
« Reply #12 on: 21 Oct 2005 04: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>

Offline ReportNet Addict

  • Global Moderator
  • Statesman
  • *****
  • Posts: 831
  • Forum Citizenship: +61/-40
  • Creator of the Impact Suite
    • The Impact Suite
Re: Report Toolbar disabling
« Reply #13 on: 21 Oct 2005 04:18:14 pm »
Code: [Select]
<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>

Offline ReportNet Addict

  • Global Moderator
  • Statesman
  • *****
  • Posts: 831
  • Forum Citizenship: +61/-40
  • Creator of the Impact Suite
    • The Impact Suite
Re: Report Toolbar disabling
« Reply #14 on: 21 Oct 2005 04:18:30 pm »
This code works for me...