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 icons when exported to PDF/EXCEL/WORD/CSV

Started by kalyan_sekhar1, 16 Nov 2005 07:27:31 AM

Previous topic - Next topic

kalyan_sekhar1

Hi ,

In my one of my posts i asked on how to hide the icons on the reports at run time, and every body gave very intresting approaches. The apporach that i took i hiding the icons using javascript, here is the code snippet

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('ReportViewSave');
hideit('Send');

But whne i click on Export to PDF icon, i am able to see alll the icons again that are hidden in the Report viewer. How to hide those even after i export to any other format ?

Thanks

sir_jeroen

That's impossible (up to now (haven't looked into it yet) to do because the hideit is called from a javascript. That script is run when you run it in HTML and not run when running PDF. What you could do is to find out which Cognos javascript is run when PDF is rendered. If you add Hideit to that script it MIGHT work but you must be carefull in doing that....

JoeBass

X QE-DEF-0260 Parsing error before or near position:  57 of : "That's impossible (up to now (haven't looked into it yet)"

:)

kalyan_sekhar1

Hi,

What is the javascript function which is called when clicked on "Export to PDF" icon ? or else can any body suggest on hiding the icons on the PDF output ? ( they should be visible in the HTML reports ) but when clicked on the "Export to PDF icon" the PDF output shouldn't carry the icons

Thanks

sir_jeroen

Have you looked into the code? Otherwise run your Report in html and look in the source.. it's all there...

kalyan_sekhar1

hi,

Thanks for the info, i am able to find the function which is called on when clicked "Export to PDF" icon, and i copied the hide code into that. The function is located in rv.js and the function name is "runInFormat(id)". But the icons are not getting hidden, can any body tell me on how to approach the icon bar when exported in PDF

Thanks

sir_jeroen

In the documentation  there's a complete chapter on customizing ReportNet... Read that first....

But do you have any programming experience? If not.. don't try it... you'll mess everything up...