COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Cognosuser2019 on 14 Aug 2015 10:37:36 AM

Title: Printing certain components in a dashboard
Post by: Cognosuser2019 on 14 Aug 2015 10:37:36 AM
Hi All,

Is it possible to print only certain components in a dashboard...? Suppose i have 2 charts 2 list in a dashboard page created in Report Studio. I want to print only one of the chart or one list item. How do i achieve it? Appreciate your response.
Title: Re: Printing certain components in a dashboard
Post by: cognostechie on 14 Aug 2015 11:44:17 AM
Reshma -

It depends on what type of Dashboard tool you want to use. Cognos has different tools for making a Dashboard. If you use Cognos Workspace then it will let you select a specific list/graph from a report.
Title: Re: Printing certain components in a dashboard
Post by: Cognosuser2019 on 14 Aug 2015 11:48:03 AM
Thanks for your response. Ya in Cognos workspace you get the option on the component. What about Report Studio?
Title: Re: Printing certain components in a dashboard
Post by: Lynn on 17 Aug 2015 02:15:07 AM
You could add conditional rendering to the report along with text items holding drill through definitions that would run the report, while passing the appropriate parameter, to conditionally render only a particular item.
Title: Re: Printing certain components in a dashboard
Post by: chinnucognos on 18 Aug 2015 05:14:56 AM
Create the another report say Print_version report by copying  the Original report , remove chart and list which you don't want to print in that print_version report.
Now come to original report, make drill thru by using text item at certain positions, assign print_version report in that drill thru and give parameters which you have used in Original report.
(note: remove prompt  passing parameters in print version report).
Let me know if u understand my point or not?
Title: Re: Printing certain components in a dashboard
Post by: Cognosuser2019 on 21 Aug 2015 01:17:34 PM
Thanks Lynn and chinnucognos for your inputs.

My friend suggested another solution using HTML item which worked fine for me. This way i could avoid creating another drill through report.

Here is the code...

First html item to be placed before the object (list/chart)

<html>
<head>
<script language="javascript">
function printdiv(printpage)
{
var headstr = "<html><head><title></title></head><body>";
var footstr = "</body>";
var newstr = document.all.item(printpage).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr+newstr+footstr;
window.print();
document.body.innerHTML = oldstr;
return false;
}
</script>
</head>
<body>
<input name="b_print" type="button" class="ipt"   onClick="printdiv('div_print');" value=" Print ">
<div id="div_print">

HTML2 Code will be as follows and it Needs to be placed after the list

</div>
</body>
</html>