COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: DanMan on 15 Dec 2014 03:35:10 AM

Title: Open new window specific size
Post by: DanMan on 15 Dec 2014 03:35:10 AM
Hello,

I have a requirement to open a new window with no IE tooolbars and at a specific size from a report written in report studio. I have used the following code that creates a button and works fine. Note I have removed server name and report locations.


<script>
function SetValues()
{
window.open('http://<Server_Name>:80/c10/cgi-bin/cognosisapi.dll?b_action=<Report_Location>&cv.header=false&cv.toolbar=false','','width=400,height=400,menubar=no,toolbar=no');

}
</script>

<input type="button" value="Set Values" onclick="SetValues();">

Problem is the button looks rather ugly and I'd like to use an image instead so I changed the code to the following:

<script>
function SetValues()
{
window.open('http://<Server_Name>:80/c10/cgi-bin/cognosisapi.dll?b_action=<Report_Location>&cv.header=false&cv.toolbar=false','','width=400,height=400,menubar=no,toolbar=no');

}
</script>

<input type="image" src="../samples/images/Finance/Template/list_blue_20_20.png" onclick="SetValues();">

When I now select the image the new window pops up but my source report goes to public folders. This is different behaviour to the button which works fine. Any ideas would be most appreciated.

Thanks

Daniel

Title: Re: Open new window specific size
Post by: qvixote on 17 Dec 2014 01:28:57 PM
Tried to change button's look using CSS? So you can change border, back color or even choose a image to put in the button's background.
Title: Re: Open new window specific size
Post by: DanMan on 19 Dec 2014 04:42:48 AM
Thanks for the reply I hadn't thought of that, do you have a css example that might do this?