COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: gjamila on 28 Oct 2010 09:11:21 AM

Title: Hide prompt line and text
Post by: gjamila on 28 Oct 2010 09:11:21 AM
Hello everyone!
I'm learning to use Cognos 8 and I'm just a beginner, so I apologize in advance for the trivial questions that I will do.
I have a request: I have a report with many prompts. When printing pdf, I would disappear to the line of text next to the prompt (for example: choose a year).
How can I do this?

Thanks!

gjamila
Title: Re: Hide prompt line and text
Post by: bloggerman on 28 Oct 2010 10:33:47 AM
You can use Javascript to remove first 2 lines of a prompt. If that is what you are askin.
Title: Re: Hide prompt line and text
Post by: gjamila on 28 Oct 2010 10:51:47 AM
Thank you very much for the reply, but my request is different... I apologize for having explained evil!
Next to the prompt I insert a text item, such as "choose the year."
I wish that when I print pdf the text item disappear or be invisible. Is it possible?

Thank you!
Title: Re: Hide prompt line and text
Post by: CognosPaul on 28 Oct 2010 01:31:10 PM
Hi G Jamila,

Instead of "evil" you could use the word "poorly". (I always prefer people to correct me when I'm speaking a different language, so I try to do the same for others.)

In the properties of the text item you have a row called Render Variable. Click on that, and create a new Boolean variable. Call it notPDF and use the following expression:

reportOutput()<>'PDF'

Next time you attempt to run the report in PDF Cognos will evaluate the render variable attached to the text item. Since the reportOutput is PDF reportOutput()<>'PDF' will resolve to FALSE and Cognos will not render the text item.
Title: Re: Hide prompt line and text
Post by: gjamila on 29 Oct 2010 03:24:55 AM
It works!!! Thank you very much!  :-* :-* :-*

Thank you for the correction, you have to work a lot with me!  ;D