COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Security => Topic started by: joseph123 on 10 Aug 2016 01:20:56 PM

Title: Disabling Toolbars on Cognos 10.2 Prompt Page only
Post by: joseph123 on 10 Aug 2016 01:20:56 PM
HI

I need to disable Toolbars on Prompt Page only not on Report in Cognos viewer.
<style>
.mainViewerHeader3{ display: none; }
</style>
When I used the following code, it disables both on Prompt page and in Report.
IS there any script to do for just Prompt Page, I don't want to to change global settings as system.xml file
Title: Re: Disabling Toolbars on Cognos 10.2 Prompt Page only
Post by: AnalyticsWithJay on 11 Aug 2016 07:16:57 AM
Have you tried adding an HTML item at the top of your prompt page with the following:

<style>
.mainViewerHeader3{ display: none !important; }
</style>


If you need it to be global, you have to check if there's a difference in the HTML structure between the prompt page and the report page. For example, if the tool bar is inside a DIV called PromptPageDiv and on the report page it's ReportPageDiv we can alter the CSS code to only do it for the class .mainViewerHeader3 when it's inside the PromptPageDiv.

Let us know.

Title: Re: Disabling Toolbars on Cognos 10.2 Prompt Page only
Post by: joseph123 on 11 Aug 2016 01:07:41 PM
I tried the code, toolbar is hiding on both Prompt Page and Report Page.
I need to hide in few reports not all reports.
Thanks for your input.
Title: Re: Disabling Toolbars on Cognos 10.2 Prompt Page only
Post by: AnalyticsWithJay on 11 Aug 2016 02:05:44 PM
Quote from: joseph123 on 11 Aug 2016 01:07:41 PM
I tried the code, toolbar is hiding on both Prompt Page and Report Page.
I need to hide in few reports not all reports.
Thanks for your input.

Place the HTML item in a conditional block. Create a Boolean variable "vIsPromptPage" which determines whether the page is a prompt page using "PageName ()" function. If it's a prompt page, render the block containing HTML code, else, render the blank block.

Let me know if this makes sense to you.
Title: Re: Disabling Toolbars on Cognos 10.2 Prompt Page only
Post by: joseph123 on 17 Aug 2016 12:59:54 PM
I tried with Conditional Block and Boolean Variable, it's disabling on both Prompt page Report Page.