Add print button to cognos report

1.6k views Asked by At

I am trying to add a print button to a Cognos report to print the whole report which when run is delievered as HTML pages. I used an HTML item and used the code:

<button type="button"onClick="window.print();return false;">Print Report</button>

This only prints the first page even after I select to print all pages. How do I make it to print all the pages?

1

There are 1 answers

1
toddsonofodin On

That is the expected behavior of the code you've written. It's printing the HTML page. Cognos doesnt return all the results - it pages to 20 rows by default. The extra rows are not hidden on the page. Don't try to reinvent the wheel here. HTML was not designed for printing. Export to PDF and print from there.