Hi everyone,
I have created a multi page tabbed report (Cognos 10.2.1: view pages as tabs option). When the report is run it creates all the pages in HTML. They can be browsed by clicking on the report tab created for each report page.
An 'ordinary' PDF button on one of the reportpages also creates all the other report pages in the PDF.
We would like to add a print-to-PDF button to each single report page which should make it possibe to output only this current report page to a PDF and ignores the other pages.
Hope you can help.
Hello @wdv72
This is what I'd try:
The button in of the the pages will call a drill through to the same report but in PDF format.
You'll be passing a parameter called "pPageNumber" to say which page is the one you want to print
Now, for each one of the pages in Cognos there is a property called "render variable". I think a boolean would work with a logic similar to this
((ReportOutput() = 'PDF') and (PageNumber() = ?pPageNumber?)) or ((ReportOutput() <> 'PDF'))
I havent tested it yet, but hopefully it will require small modification be functional
Hope it helps!
Happy reporting!
The default report output is set to PDF. Thought it should work with only (PageName ()=?P_Pagename?) in the boolean render variable.
But I am confronted with an error:
RSV-VAL-0032
The following expression is not valid: PageName ()=?P_Pagename?. If the item exists in a query but is not referenced in the layout, add it to a property list. CRX-API-0005 An error occurred at or near the position '12'. The variable named '?P_Pagename?' is invalid.