Taming the JavaScripts

In the 'Tips and Tricks – JavaScripts' chapter, we saw many recipes to manipulate the prompts. However, it is to be noted that JavaScripts are executed every time the page loads. Hence, it is important to control the execution of certain scripts.

This recipe will show you why taming the JavaScripts is necessary in certain cases, and how to do it.

Getting ready

We will use the report created in 'Dynamic default value for prompt' recipe (Chapter 3) for this one.

How to do it...

  1. Open the report in Cognos Report Studio and save it with a different name because we are going to change it.
  2. Run the report to see what it is doing. We have already written the JavaScript in this report to default the date to second entry from top, where ...

Get IBM Cognos 8 Report Studio Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.