Cautions about HTML items and JavaScript files

This recipe shows you that the HTML items and JavaScript files used on the report page are not executed when a report runs in PDF or Excel.

Getting ready

Open the report that we created in the Creating a variable width bar chart using JavaScript recipe in Chapter 3, Using JavaScript Files – Tips and Tricks.

How to do it...

Here, we will run the report in both HTML and PDF format as described in the following steps:

  1. Run the report in HTML format. Ensure that the bar charts are generated fine.
  2. Now re-run the report in PDF format.
  3. Notice that bar charts are absent from the PDF output.

How it works...

When users run the report in any format other than HTML, the prompt page generated is still a web page. Therefore, ...

Get IBM Cognos 10 Report Studio Cookbook - Second Edition 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.