If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Button to mail report/Button to save report output

Started by yoniw, 22 May 2014 08:57:58 AM

Previous topic - Next topic

yoniw

Hey,
We are changing the look & feel of Cognos completely, and one of the requests is to design two new buttons for sending report mail and saving report output.

I searched across the web and dived deep into the javascripts of Cognos... the only outcome i reached is that i copied the HTML of the buttons inside the "Keep This Version" and pasted it inside an html item - it was an almost success, it was successful  only when i clicked the "keep this vesrion" and then went to the buttons i created and clicked on them. if i just loaded the page

Anyone knows how to do it?

Attached screenshots

Thanks!!!
Yoni

CognosPaul

You have 10.2.1, yeah?

Put this at the top of the page, or with the rest of your embedded JS:
<script>
function emailPage()
{
   try   {window['oCV'+'_THIS_'].getRV().SendReport(false);}
   catch (err) {}
}
</script>


Now put this wherever you want the button to be:
<input type="button"
class="ToolbarButton"
onclick="emailPage()"
value="Email"
ACCESSKEY="e"
title="Keyboard shortcut: alt-e">


yoniw


chiz

Quote from: CognosPaul on 25 May 2014 02:10:28 AM
You have 10.2.1, yeah?

Put this at the top of the page, or with the rest of your embedded JS:
<script>
function emailPage()
{
   try   {window['oCV'+'_THIS_'].getRV().SendReport(false);}
   catch (err) {}
}
</script>


Now put this wherever you want the button to be:
<input type="button"
class="ToolbarButton"
onclick="emailPage()"
value="Email"
ACCESSKEY="e"
title="Keyboard shortcut: alt-e">


hello guys,
i try to do this with SaveReport(), but it is not work.
can you help me pls?

I put this at top:
<script>
function savePage()
{
   try   {window['oCV'+'_THIS_'].getRV().SaveReport(false);}
   catch (err) {}
}
</script>


And put this wherever I want the button to be:
<input type="button"
class="ToolbarButton"
onclick="savePage()"
value="Save"
ACCESSKEY="e"
title="Keyboard shortcut: alt-e">


But i getting an error:
RSV-SRV-0001
       The request is missing the objectPath


I need Save report version, like "Save Report" button.
Also, I need send this report to two person with this button.

Thanks,
Best Regards Alex


BigChris

 don't do javascript, but it looks like you're trying to save a report by saving a page...doesn't feel like that should work to me

chiz

Quote from: BigChris on 08 Dec 2015 03:27:49 AM
don't do javascript, but it looks like you're trying to save a report by saving a page...doesn't feel like that should work to me

i trying to do that:
<button type="button" name="SAVE" id="SAVE777" class="SAVE" onmouseover="this.className = 'clsPromptButtonOver'" onmouseout="this.className = 'clsPromptButton'" onclick="window.oCV_THIS_.getRV().SaveReport('_THIS_')" style="">SAVE</button>

but getting the same error...

chiz


chiz

OMG, sorry guys,

my variant with:
<button type="button" name="SAVE" id="SAVE777" class="SAVE" onmouseover="this.className = 'clsPromptButtonOver'" onmouseout="this.className = 'clsPromptButton'" onclick="window.oCV_THIS_.getRV().SaveReport(false)" style="">SAVE</button>

is work well!!

only from portal, BUT DONT WORK in report studio...

BigChris

I've just split your code up a bit to make it a bit easier to read:

<button
type="button" name="SAVE"
id="SAVE777" class="SAVE"
onmouseover="this.className = 'clsPromptButtonOver'"
onmouseout="this.className = 'clsPromptButton'"
onclick="window.oCV_THIS_.getRV().SaveReport(false)"
style="">
SAVE
</button>


I think it makes sense that that code only takes effect once the report runs...the Report Studio is only building the structure of the report. The HTML (and the associated javascript) only gets executed once the report is run - at least that's the way I've always understood it.

chiz

Quote from: BigChris on 08 Dec 2015 06:45:26 AM
I've just split your code up a bit to make it a bit easier to read:

<button
type="button" name="SAVE"
id="SAVE777" class="SAVE"
onmouseover="this.className = 'clsPromptButtonOver'"
onmouseout="this.className = 'clsPromptButton'"
onclick="window.oCV_THIS_.getRV().SaveReport(false)"
style="">
SAVE
</button>


I think it makes sense that that code only takes effect once the report runs...the Report Studio is only building the structure of the report. The HTML (and the associated javascript) only gets executed once the report is run - at least that's the way I've always understood it.

Thanks,
i need to Save Report Version into custom folder, not in "Version in report",
is it possible?

How to create button with function:
send report to AbcMen@mail.com without accept (1 click - 1 send)  ?

chiz

Quote from: chiz on 08 Dec 2015 06:55:41 AM
How to create button with function:
send report to AbcMen@mail.com without accept (1 click - 1 send)  ?
Anybody knows?